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 可解決!