安装需求
需要安装的库,若没有出现的报错将会在 异常解决 里说明
yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker autoconf
查看git版本
git --vsersion
卸载Centos自带的git1.7.1:
yum remove git
下载git2.2.1并将git添加到环境变量中
wget https://github.com/git/git/archive/v2.2.1.tar.gz
tar zxvf v2.2.1.tar.gz
cd git-2.2.1
make configure
./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv
make all doc # 可能出错,参考下面异常解决
make install install-doc install-html
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc
异常解决
1、Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 3. BEGIN failed--compilation aborted at Makefile.PL line 3.
解决:
sudo yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
2、/bin/sh: line 1: asciidoc: command not found
wget https://sourceforge.net/projects/asciidoc/files/asciidoc/8.6.9/asciidoc-8.6.9.tar.gz/download
tar -xzf asciidoc-8.6.9.tar.gz
cd asciidoc-8.6.9
./configure
sudo make install
3./bin/sh: line 1: xmlto: command not foundyum install xmlto3.
GEN configure
/bin/sh: autoconf: command not found
make: *** [configure] Error 127
yum install autoconf
引用:
linux安装git_weixin_30765319的博客-CSDN博客
Git服务器安装详解及安装遇到问题解决方案_zhangxiaocc的博客-CSDN博客
Can't locate ExtUtils/MakeMaker.pm in @INC 错误的解决方式_w87848608的专栏-CSDN博客
linux下git升级_吕秀军的博客-CSDN博客_linux升级git