【发布时间】:2015-04-06 13:14:00
【问题描述】:
以下是当前版本。
git --version
git version 2.1.0
如何在 CentOS 中更新到最新的 git 版本 2.2.x。 yum install git 说它是 Linux AMI 实例上的最新版本。
【问题讨论】:
以下是当前版本。
git --version
git version 2.1.0
如何在 CentOS 中更新到最新的 git 版本 2.2.x。 yum install git 说它是 Linux AMI 实例上的最新版本。
【问题讨论】:
你有一个新版本的 git 是令人惊讶的。这不是为 CentOS 6 或 7 正式打包的。
CentOS 6 附带 git 1.7.1。
CentOS 7 附带 1.8.3.1。
要获得更新版本的 git,您需要找出您已经从哪里获得“新”版本的 git,并查看他们是否有更新。亚马逊本可以自己打包一个更新的版本,但可能还没有更新那个包。
来自yum info git 的输出(来自 cmets):
$ yum info git
Loaded plugins: priorities, update-motd, upgrade-helper
Installed Packages
Name : git
Arch : x86_64
Version : 2.1.0
Release : 1.35.amzn1
Size : 22 M
Repo : installed
From repo : amzn-main
Summary : Fast Version Control System
URL : git-scm.com
License : GPLv2
Description : Git is a fast, scalable, distributed revision control system with an
: unusually rich command set that provides both high-level operations
: and full access to internals.
亚马逊似乎自己打包了git 2.1 版,如果yum update 没有为您提供更新的版本,那么他们还没有打包任何更新的版本。
Amazon Linux AMI 的 release notes 页面似乎同意这一点。
【讨论】:
yum info git.
amzn-main 存储库。如果yum update 没有为您提供新版本的 git,那么他们还没有打包。
在 git 的文档中给出,对于 RHEL 和 CentOS,我们必须从源代码构建它以获得最新版本。
【讨论】: