linux – 如何在CentOS上安装当前稳定版的Git?

我有兴趣在CentOS Linux 5.4主机上安装 Git.

Pro Git在线书籍中的installation instructions提供了两种途径:从源代码安装或使用主机的软件包管理系统(在本例中为yum).

但是,两者都不适合我.

从yum安装

当我尝试yum时,我得到了这个结果……

$sudo yum install git-core
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.team-cymru.org
 * extras: centos.mirrors.tds.net
 * updates: ftp.osuosl.org
Setting up Install Process
No package git-core available.
nothing to do

(为什么百胜不会找到这么普通的包?它与Kernel.org有关吗?)

从源代码安装

另一种选择是下载源代码.

main Git website上给出的​​最新稳定版Git,v1.7.6.1的位置是http://kernel.org/pub/software/scm/git/git-1.7.6.1.tar.bz2.

但是,该链接会导致页面显示“停机维护”.由于攻击,kernel.org似乎已经关闭了几个星期.

有什么建议?

谢谢!

解决方法

一个是因为CentOS只包含在RHEL中找到的包,而旧版本的RHEL没有Git.如果您想通过Yum Git,则需要启用 EPEL.请注意,它不一定包含最新版本.

第二个是……不幸的是,你无能为力.现在坚持使用EPEL.

相关文章

insmod和modprobe加-f参数导致Invalid module format错误 这...
将ArchLinux安装到U盘 几个月前入门Arch的时候上网搜了不少安...
1、安装Apache。 1)执行如下命令,安装Apache服务及其扩展包...
一、先说一下用ansible批量采集机器信息的实现办法: 1、先把...
安装配置 1. 安装vsftpd 检查是否安装了vsftpd # rpm -qa | ...
如何抑制stable_secret读取关键的“net.ipv6.conf.all.stabl...