git on linux, Right path, wrong version number - linux

[wen#localhost git-master]$ /usr/local/bin/git --version
git version 1.9.0.GIT
[wen#localhost git-master]$ which git
/usr/local/bin/git
[wen#localhost git-master]$ git --version
git version 1.7.1
Installed follow Getting-Started-Installing-Git
My linux dist info.
[wen#localhost git-master]$ uname -a
Linux localhost.localdomain 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar 25 19:59:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[wen#localhost git-master]$ cat /etc/centos-release
CentOS release 6.5 (Final)
What's wrong with this ?
BTW, I installed the Development Tools which contains Git 1.7.1.

Follow below, I resolve the problem.
yum remove git
exit
# reopen an terminal
Now, everything is ok :-)
EDIT
Actually, the problem is caused by hash(man hash,help hash),
you can clear all cache by hash -r, or only one cache hash -d git.
But, I think, remove the old version is not bad,saved my disk prevent the conflict.

Related

Why does the Electron Quickstart App fail to start correctly on my Ubuntu instance?

I followed the following steps on a fresh installation of Ubuntu 20.10:
# Clone this repository
git clone https://github.com/electron/electron-quick-start
# Go into the repository
cd electron-quick-start
# Install dependencies
npm install
# Run the app
npm start
The output fromm the start command is:
up to date, audited 89 packages in 1s
found 0 vulnerabilities
> electron-quick-start#1.0.0 start
> electron .
(node:4081) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron. See https://github.com/electron/electron/issues/23506 for more information
The resulting window looks like this:
System Information:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.10
Release: 20.10
Codename: groovy
Linux andy-Parallels-Virtual-Platform 5.8.0-31-generic #33-Ubuntu SMP Mon Nov 23 18:44:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Node version: v15.3.0
Electron-quick-start commit hash: 2b0dbb098
After doing a Google Image search I found the cause and the current resolution:
https://github.com/electron/electron/issues/26061
This only happens on Parallels at a specific version.

Why does `stack --version` seem to show a different version than was installed?

I ran stack upgrade and it seems to have worked. Output to the console says I have a new stack executable, but stack --version says differently. What am I missing?
~
$ stack upgrade
Current Stack version: 1.3.2, available download version: 1.7.1
Newer version detected, downloading
Querying for archive location for platform: osx-x86_64-static
Querying for archive location for platform: osx-x86_64
Downloading from: https://github.com/commercialhaskell/stack/releases/download/v1.7.1/stack-1.7.1-osx-x86_64.tar.gz
Download complete, testing executable
Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2
New stack executable available at /Users/skissh/.local/bin/stack
~
$ which stack
/Users/skissh/.local/bin/stack
~
$ stack --version
Version 1.3.2, Git revision 3f675146590da4f3edf768b89355f798229da2a5 (4395 commits) x86_64 hpack-0.15.0
~
$ cd ~/.local/bin
~/.local/bin
$ ls -l
total 64040
-rwxr-xr-x 1 skissh staff 32788156 Jun 17 12:27 stack
~/.local/bin
As #Thomas M. DuBuisson commented this could well have been fixable with hash -r. After restarting terminal the newly installed executable was referenced by stack --version. I didn't run hash -r, but I did run hash in the new terminal and the cache had been cleared.

node version difference between mac and linux

on my mac, key node -v, I get "v6.2.2", on centos, I get "v0.10.36", on centos, I keys "uname -a", I get "Linux VM_80_24_centos 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux", how can I understand the difference between two version num.
It seems like one is node version and another is npm version. You might executed the different commands.
To check node version:
node -v
will give 'v6.2.2'.
To check npm version:
npm -v
will give 'v0.10.36'.

Not able to build libtool 2.4.3 using gcc 4.8.2 on CentOS 6.6

Background:
Made CentOS 6.6 x64 VM on VMware workstation 10.
sudo yum update
Directly installed gcc 4.8.2 from answer given here.Set variables using scl enable devtoolset-2 bash
Downloaded libtool 2.4.3
wget http://gnumirror.nkn.in/libtool/libtool-2.4.3.tar.gz
./configure --prefix=/usr`
sudo make
Build errors
config.log
$uname -a
Linux sphirewall 2.6.32-504.1.3.el6.x86_64 #1 SMP Tue Nov 11 17:57:25 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Try lower version.
It worked for me :
OS Centos 6.7
[root#host libtool-2.4]# cat /etc/centos-release
CentOS release 6.7 (Final)
GCC version
[root#host libtool-2.4]# rpm -q gcc
gcc-4.4.7-18.el6.x86_64
libtool from ftp://ftp.gnu.org/gnu/libtool/libtool-2.4.tar.gz

How do I know which Linux package to install for my Linux AMI

Ubuntu/Debian
Red Hat/Fedora/CentOS
Mac OS X
openSUSE
FreeBSD
OpenBSD
Gentoo
I have an application which has been natively packed on the above platforms, how do I know which one to install on my Linux AMI on EC2.
uname -a displays the following
Linux ip-10-315-48-29 3.7.31.31-83.9.amzn1.i686 #1 SMP Sat Feb 18 20:11:16
UTC 2011 i686 i686 i386 GNU/Linux
It's obviously some kind of Linux, so look for a file in /etc that ends in -release or _version:
ls /etc/*-release /etc/*_version
That should help you determine which Linux distribution you have. lsb-release is usually Ubuntu, while fedora-release, redhat-release indicate Fedora, RedHat, or CentOS. You can find a more complete listing here.
Alternatively, you can see if rpm or dpkg are installed by trying to run those commands:
rpm --version
dpkg --version
If dpkg is installed, it's probably Ubuntu/Debian based. If rpm is installed, it's probably RedHat/CentOS or openSUSE based.

Resources