You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

CentOS 7停服后配置Vault源成功但无法安装Git 2.x及以上版本的求助

CentOS 7停服后配置Vault源成功但无法安装Git 2.x及以上版本的求助

各位大佬好,想请教个问题:CentOS 7停服之后,我用yum update的时候一直报错,于是我把/etc/yum.repos.d目录下的这些文件都删掉了:

  • CentOS-Base.repo
  • CentOS-CR.repo
  • CentOS-Debuginfo.repo
  • CentOS-fasttrack.repo
  • CentOS-Media.repo
  • CentOS-Sources.repo
  • CentOS-x86_64-kernel.repo

之后我新建了一个repo文件,内容如下:

[base]
name=CentOS-7.9 - Base
baseurl=https://vault.centos.org/7.9.2009/os/x86_64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1

[updates]
name=CentOS-7.9 - Updates
baseurl=https://vault.centos.org/7.9.2009/updates/x86_64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1

[extra]
name=CentOS-7.9 - Extras
baseurl=https://vault.centos.org/7.9.2009/extras/x86_64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1

现在yum update已经能正常执行了,但我想要安装版本大于2的Git,尝试了一些相关方法却没成功,想问问大家有没有可行的解决办法?

备注:内容来源于stack exchange,提问作者Hasbullah Marwan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.16 09:18:13