社区微信群开通啦,扫一扫抢先加入社区官方微信群
社区微信群
1:更新当前的系统的包等yum:
yum -y update
2:安装git所需的一些依赖
yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
3:git编译安装,所需依赖以及介绍
#a、usr/local/git/share/locale
Can not locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib/perl5/usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl/usr/lib/perl5 /usr/share/perl5 .) at Makefile.PL line 3.
BEGIN failed--compilation aborted at Makefile.PL line 3.
#解决:yum install perl-ExtUtils-MakeMaker
#b、tclsh failed; using unoptimized loading
MSGFMT po/de.msg make[1]: *** [po/de.msg] Error 127
#解决:yum install tcl
#c、/bin/sh: msgfmt: command not found
make: *** [po/build/locale/da/LC_MESSAGES/git.mo] Error 127
#解决:yum install gettext-devel
#d、git clone时候提示fatal: Unable to find remote helper for 'https'
#解决:yum install libcurl-devel 安装完成后,版本确认。
[root@localhost SelfGoodCode]# git --version
git version 1.8.0
4:解压
#解压 tar zxvf git-2.11.0.tar.gz
tar -zxvf zxvf git-2.11.0.tar.gz
cd git-2.11.0
5:编译安装
#编译安装
make prefix=/usr/local/git all
make prefix=/usr/local/git install
6:添加环境变量
vim /etc/profile
#加入
export PATH=$PATH:/usr/local/git/bin
#生效配置文件
source /etc/profile
7:查看 版本
whereis git
git –version
----over
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!