Linux安装Git

git在linux的安装:linux

1.先从官网 http://git-scm.com/download
2.将文件git-2.4.5.tar.gz复制到/opt/git/gitinstall下,并解压git

tar -zxvf git-2.4.5.tar.gz

3.进行配置安装code

cd git-2.4.5
 ./configure 
 make        
 make install

但在执行make操做时报错:缺乏gcc,yum安装gccget

yum -y install gcc

从新执行make,make install,无错误输出,验证安装是否成功:it

git --version

以上输出就意味着安装成功了!

安装git报错perl5io

出现错误一:

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

可解决!
相关文章
相关标签/搜索