Git 在RedHat安装

来源:互联网 发布:nginx errorlog 编辑:程序博客网 时间:2024/04/30 19:28
1:下载 wget https://www.kernel.org/pub/software/scm/git/git-1.9.4.tar.gz
2:tar zxf git-1.9.4.tar.gz
3:执行./configure
4:make
5:make install
这个步骤需要root用户执行
6:查看git
git --version

安装过程错误:
1.报错: In file included from credential-store.c:1:
cache.h:21:18: warning: zlib.h: No such file or directory
In file included from credential-store.c:1:
cache.h:23: error: expected specifier-qualifier-list before ‘z_stream’
make: *** [credential-store.o] Error 1
原因:缺少 zlib的头文件, 开发包没装,
解决:
yum install zlib
yum install zlib-devel

2.报错:usr/bin/perl Makefile.PL PREFIX='/usr/local/git' '' --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
service httpd restart





原创粉丝点击