Centos 6自带Git版本1.7.1,无法满足项目需求,故升级至最新Git版本。
下载地址:https://www.kernel.org/pub/software/scm/git/
wget https://www.kernel.org/pub/software/scm/git/git-2.9.5.tar.gz tar -zxvf git-2.9.5.tar.gz在这里如果报错:git: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
解决办法: 在/etc/ld.so.conf中加一行/usr/local/lib 然后运行/sbin/ldconfig 就解决了~