FreezeJ' Blog

编译安装git2.4.8

2021-10-09

在centos 6的机器上,使用默认yum安装的git克隆代码的时候,提示error: The requested URL returned error: 400 Bad Request while accessing,使用另一台centos 7高版本的git测试,同样的命令却不会报错,疑似是git的版本问题,重新编译git后问题解决。

编译安装命令

# centos 6.8 centos 7.7测试安装成功

yum -y install vim gcc-c++ gcc make openssl-devel openssl gettext perl-ExtUtils-MakeMaker
wget https://www.kernel.org/pub/software/scm/git/git-2.4.8.tar.gz  --no-check-certificate  # 关闭证书校验
tar xf git-2.4.8.tar.gz
cd git-2.4.8
./configure --prefix=/usr/local/git  --with-curl --with-expat
make
make install

编译结果