刪除低版本的yum安裝的git
yum remove git
del success;
wget https://www.kernel.org/pub/software/scm/git/git-2.8.3.tar.gz
解壓cd進(jìn)去
./configure prefix=/usr/local/git/
make && make install
//如果這里出錯(cuò):perl Makefile.PL;make;make install錯(cuò)誤
需要安裝:
yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
vi /etc/profile
export PATH=$PATH:/usr/local/git/bin
source /etc/profile
當(dāng)git出現(xiàn)clone https的錯(cuò)誤時(shí)候說(shuō)明沒(méi)有安裝curl-devel
需要yum install curl-devel
然后到git目錄就重新安裝一遍