CentOS 7 上安装git 的几种方法。
源码安装
- 安装对应的依赖
1
2yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum install -y gcc perl-ExtUtils-MakeMaker - 下载源码编译安装
确保系统git 已经被卸载
1 | yum remove -y git(先执行本选项,确保卸载掉git) |
1 | cd /usr/src |
rpm 安装(基于CentOS7)
1 | yum install -y epel-release (#error: Failed dependencies:epel-release = 7 is needed by ius-release-1.0-15.ius.centos7.noarch) |