Centos安装git2.2.1

># yum remove 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
># git --version
>git version 2.2.1

三、安装中的错误
1、error: MSGFMT po/de.msg make[1]: *** [po/de.msg] Error 127
解决:yum install tk zlib-devel openssl-devel perl cpio expat-devel gettext-devel
2、errro: asciidoc: command not found
解决:yum install -y asciidoc
3、errro:xmlto: command not found
解决:yum install -y xmlto

最后提醒,升级安装git的时候,最好一次安装依赖。
yum install -y tk zlib-devel openssl-devel perl cpio expat-devel gettext-devel asciidoc xmlto

这里执行make all doc时还会报一个错误
usr/bin/perl Makefile.PL PREFIX='/usr/local/git' INSTALL_BASE='' --localedir='/usr/local/git/share/locale'
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.
make[1]: *** [perl.mak] Error 2
make: *** [perl/perl.mak] Error 2

解决方法:
yum install perl-ExtUtils-MakeMaker package
上一篇:以前的学习笔记整理:第二层交换和生成树协议(STP)


下一篇:Hive之Hive快捷查询(避免Mapruduce查询)