【问题标题】:Update to latest git version 2.2.x in CentOS在 CentOS 中更新到最新的 git 版本 2.2.x
【发布时间】:2015-04-06 13:14:00
【问题描述】:

以下是当前版本。

git --version
git version 2.1.0

如何在 CentOS 中更新到最新的 git 版本 2.2.x。 yum install git 说它是 Linux AMI 实例上的最新版本。

【问题讨论】:

    标签: git centos


    【解决方案1】:

    你有一个新版本的 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 AMIrelease notes 页面似乎同意这一点。

    【讨论】:

    • 如何在 Linux AMI 中找出哪个存储库提供了当前的 git 2.1 版本?
    • @Rpj 我请求的输出将是一个有用的开始。还有yum info git.
    • _gitpath=$(command -v git);回声“$_gitpath”; rpm -qf "$_gitpath" /usr/bin/git git-2.1.0-1.35.amzn1.x86_64
    • yum info git 加载的插件:priorities、update-motd、upgrade-helper 安装的包名称:git Arch:x86_64 版本:2.1.0 发布:1.35.amzn1 大小:22 M 回购:从回购安装: amzn-main 摘要 : 快速版本控制系统 URL : git-scm.com 许可证 : GPLv2 描述 : Git 是一个快速、可扩展的分布式版本控制系统 : 异常丰富的命令集提供高级操作 : 和完全访问内部结构。 :
    • 所以它来自亚马逊提供的amzn-main 存储库。如果yum update 没有为您提供新版本的 git,那么他们还没有打包。
    【解决方案2】:

    在 git 的文档中给出,对于 RHEL 和 CentOS,我们必须从源代码构建它以获得最新版本。

    【讨论】:

      猜你喜欢
      • 2014-03-16
      • 1970-01-01
      • 2014-03-17
      • 2013-09-21
      • 2020-12-29
      • 1970-01-01
      • 2019-09-14
      • 1970-01-01
      相关资源
      最近更新 更多