Centos 6.5 Git1.7.1升级到Git2.2.1

2016-07-30 10:52:30来源:oschina作者:MarkCo人点击

安装需求:
>#yuminstallcurl-develexpat-develgettext-developenssl-develzlib-develasciidoc>#yuminstallgccperl-ExtUtils-MakeMaker
error:```/utf8.c:463:undefinedreferenceto`libiconv'```
>#wgethttp://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
>#tarzxvflibiconv-1.14.tar.gz
>#cdlibiconv-1.14
>#./configure--prefix=/usr/local/libiconv
>#make&&makeinstall
卸载Centos自带的git1.7.1:

通过git –version查看系统带的版本,Cento6.5应该自带的是git版本是1.7.1


>#yumremovegit
下载git2.2.1并将git添加到环境变量中
>#wgethttps://github.com/git/git/archive/v2.2.1.tar.gz>#tarzxvfv2.2.1.tar.gz>#cdgit-2.2.1>#makeconfigure>#./configure--prefix=/usr/local/git--with-iconv=/usr/local/libiconv>#makealldoc>#makeinstallinstall-docinstall-html>#echo"exportPATH=$PATH:/usr/local/git/bin">>/etc/bashrc>#source/etc/bashrc
查看版本号
>#git--version>gitversion2.2.1

最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台