Git 通过源码编译安装 2.12.2 遇到的问题及解决

来源:互联网 发布:网络会员管理系统 编辑:程序博客网 时间:2024/06/03 14:54

Git 源码:

https://github.com/git/git/releaseswget https://github.com/git/git/archive/v2.12.2.tar.gz

错误:

Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl

解决,安装 install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker 即可:

yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker

错误:

LINK git-credential-storelibgit.a(utf8.o): In function `reencode_string_iconv’:/opt/git-master/utf8.c:530: undefined reference to `libiconv’libgit.a(utf8.o): In function `reencode_string_len’:/opt/git-master/utf8.c:569: undefined reference to `libiconv_open’/opt/git-master/utf8.c:588: undefined reference to `libiconv_close’/opt/git-master/utf8.c:582: undefined reference to `libiconv_open’collect2: ld returned 1make: *** [git-credential-store] error 1 

解决,安装 libiconv 即可

https://ftp.gnu.org/gnu/libiconv/wget https://ftp.gnu.org/gnu/libiconv/libiconv-1.15.tar.gztar -xvf libiconv-1.15.tar.gzcd libiconv-1.15./configure --prefix=/usr/local/libiconv && make && make install

然后 git 重新安装

make configure./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconvmake && make install
0 0
原创粉丝点击