Git1.7.1升级到2.2.1

git 23333 71℃ 0评论

1,卸载原有git

yum remove git

2,安装依赖环境

yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc -y

yum install gcc perl-ExtUtils-MakeMaker xmlto -y

3,编译安装依赖环境libiconv

tar zxvf libiconv-1.14.tar.gz

cd libiconv-1.14

./configure –prefix=/usr/local/libiconv

make && make install

注意:Win7下安装libiconv时可能出现’gets’ undeclared here (not in a function)错误,解决方法见下面文档:

4,编译安装git

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

5,设置环境变量

echo “export PATH=$PATH:/usr/local/git/bin” >> /etc/bashrc

source /etc/bashrc

 

附,libiconv和git下载:

libiconv-1.14.tar.gz

git-2.19.0.tar.gz

本文链接地址: Git1.7.1升级到2.2.1

转载请注明:蛋疼实验室 » Git1.7.1升级到2.2.1

喜欢 (2)
发表我的评论
取消评论

*

表情 签到

Hi,请填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址