CentOS7升级git2.17 - 攒一口袋比卡丘的博客 - CSDN博客

部署环境、卸载原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

 

原文链接:https://host.fubi.hk/foreshadowinghost/zhishiku/20181025/8362.html

Original url: Access
Created at: 2019-01-22 17:15:07
Category: default
Tags: none

请先后发表评论
  • 最新评论
  • 总共0条评论