本地服务器版本:
[root@vm_001034_op-test git-2.0.5]# cat /etc/redhat-release
CentOS release 6.5 (Final)
[root@vm_001034_op-test git-2.0.5]#
笔者从网上找了很多资料,最终参考几份资料才安装成功的。
原因很简单,就是没有安装git的依赖包。
以下yum是执行的一些解决依赖的yum命令,有些报错有些成功,应该是最后几条生效解决了 :
yum groupinstall “Development Tools”
yum install “Development Tools”
yum install zlib-devel perl-ExtUtils-MakeMaker asciidoc xmlto openssl-devel
yum install openssl-devel
yum install -y xmlto
yum install -y asciidoc
yum install zlib-devel perl-ExtUtils-MakeMaker
yum install zlib-devel
yum install perl-ExtUtils-MakeMaker
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum install gcc perl-ExtUtils-MakeMaker
yum remove git
下载安装git
cd /usr/src/
wget https://www.kernel.org/pub/software/scm/git/git-2.0.5.tar.gz
tar xzf git-2.0.5.tar.gz
cd git-2.0.5
make prefix=/usr/local/git all
make prefix=/usr/local/git install
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc
git --version
原文地址:http://blog.51cto.com/993960/2349779