CentOS 7 升级git 2.17

Linux, 折腾 2018/05/15

安装环境、卸载原git

yum remove git -y
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc gcc perl-ExtUtils-MakeMaker -y

编译libiconv

wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz
tar zxvf libiconv-1.15.tar.gz 
cd libiconv-1.15
./configure --prefix=/usr/local/libiconv
make && make install

下载git源码并编译

wget https://github.com/git/git/archive/v2.17.0.tar.gz
tar xzvf v2.17.0.tar.gz 
cd git-2.17.0
make configure
./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv
make install
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc

查看版本

git --version

本文标签:


评论(本站已开启评论回复邮件通知功能,请如实填写邮箱以便及时收到回复)

温馨提示

1.请考虑提问别人前,是否需要使用「请问」「谢谢」等这样的词?

2.请回想一下,是否仔细阅读过文章?提出的问题文章内是否已经释疑?