git 編譯部署

依賴安裝

yum remove git
yum install gcc
yum install gcc-c++
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum install gcc perl-ExtUtils-MakeMaker

下載git

git-2.11.0.tar.gz
http://configcenter.oss-cn-beijing.aliyuncs.com/tool/git-2.11.0.tar.gz

tar zxvf git-2.11.0.tar.gz
cd git-2.11.0
./configure --prefix=/usr/local/git
make && make install
export PATH="/usr/local/git/bin:$PATH"
source /etc/profile

報錯及解決

make報錯:
SUBDIR perl
/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-Embed -y

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章