git在linux的安装:
1.先从官网 http://git-scm.com/download
2.将文件git-2.4.5.tar.gz复制到/opt/git/gitinstall下,并解压
tar -zxvf git-2.4.5.tar.gz
3.进行配置安装
cd git-2.4.5
./configure
make
make install
但在执行make操作时报错:缺少gcc,yum安装gcc
yum -y install gcc
重新执行make,make install,无错误输出,验证安装是否成功:
git --version
以上输出就意味着安装成功了!
安装git报错perl5
出现错误一:
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.
行进安装
出现错误二:
/bin/sh: msgfmt: command not found
yum install gettext-devel
可解决!
来源:oschina
链接:https://my.oschina.net/u/2555206/blog/776611