git configure 配置时没有设定 --with-curl --with-expat 造成

首先确定是否安装curl包:

rpm -qa | grep curl

如果没有安装,一定要安装:

yum install -y curl curl-devel

安装完成后,删除原安装目录和编译目录,重新解压缩:

tar -zxf git-2.9.2.tar.gz -C /tmp/
cd /tmp/git-2.9.2/
./configure --prefix=/usr/local/git --with-curl --with-expat
make
make install


git编译时,make报错:

/usr/bin/perl Makefile.PL PREFIX='/usr/local' INSTALL_BASE='' --localedir='/usr/local/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] 错误 2
make: *** [perl/perl.mak] 错误 2

yum install perl-ExtUtils-MakeMaker
报错:

    SUBDIR git-gui
GITGUI_VERSION = 0.20.GITGUI
    * new locations or Tcl/Tk interpreter
    GEN git-gui
    INDEX lib/
    * tclsh failed; using unoptimized loading
    MSGFMT    po/bg.msg make[1]: *** [po/bg.msg] 错误 127
make: *** [all] 错误 2

yum install -y tcl-devel


报错:

    SUBDIR templates
    MSGFMT po/build/locale/bg/LC_MESSAGES/git.mo
/bin/sh: msgfmt: command not found
make: *** [po/build/locale/bg/LC_MESSAGES/git.mo] 错误 127


yum install -y gettext-devel