CentOS 7 所有的 yum.d 仓库已删除

huangapple go评论70阅读模式
英文:

CentOS 7 All yum.d.repos deleted

问题

I have googled and tried all the solutions I can find to this. An admin somehow broke yum trying to install an mssql package by adding the repo, then tried different ways to fix, as did I.
我已经尝试了所有我能找到的解决方案,一个管理员在尝试安装mssql包时不知何故破坏了yum,然后尝试了不同的方法来修复,我也尝试了。

I deleted all repos and need to start over. Different Stack solutions have suggested trying
我删除了所有的仓库,需要重新开始。不同的Stack解决方案建议尝试

rpm -Uvh --force http://mirror.centos.org/centos-7/7/os/x86_64/Packages/centos-release-7.3.10.1160.88.1.el7.centos.x86_64.rpm
curl: (22) The requested URL returned error: 404 Not Found
rpm -Uvh --force http://mirror.centos.org/centos-7/7/os/x86_64/Packages/centos-release-7.3.10.1160.88.1.el7.centos.x86_64.rpm
curl: (22) The requested URL returned error: 404 Not Found
rpm -iv --replacepkgs http://vault.centos.org/7.3.10/BaseOS/x86_64/os/Packages/centos-release-7.3.10.1160.88.1.el7.centos.x86_64.rpm
curl: (22) The requested URL returned error: 404 Not Found

I also copied and pasted yum.repos.d from another CentOS 7, but not exactly the same version. It was 3.10.0-1062.18.1.el7.x86_64, and this one is 3.10.0-1160.88.1.

我还复制粘贴了来自另一个CentOS 7的yum.repos.d,但版本不完全相同。那个版本是3.10.0-1062.18.1.el7.x86_64,而这个版本是3.10.0-1160.88.1。

None of this has worked, and I am at my wits' end. From what I have gleaned so far, I need an rpm named centos-release-7.3.10.1160.88.1.el7.centos.x86_64.rpm to replace the repos correctly but cannot find one.

所有这些都没有奏效,我已经束手无策。根据我迄今为止所了解的情况,我需要一个名为centos-release-7.3.10.1160.88.1.el7.centos.x86_64.rpm的rpm来正确替换仓库,但找不到一个。

英文:

I have googled and tried all the solutions I can find to this. An admin somehow broke yum trying to install an mssql package by adding the repo, then tried different way to fix, as did I.
I deleted all repos and need to start over. Different Stack solutions have suggested trying

> rpm -Uvh --force http://mirror.centos.org/centos-7/7/os/x86_64/Packages/centos-release-7.3.10.1160.88.1.el7.centos.x86_64.rpm
> curl: (22) The requested URL returned error: 404 Not Found
> rpm -Uvh --force http://mirror.centos.org/centos-7/7/os/x86_64/Packages/centos-release-7.3.10.1160.88.1.el7.centos.x86_64.rpm
> curl: (22) The requested URL returned error: 404 Not Found
> rpm -iv --replacepkgs http://vault.centos.org/7.3.10/BaseOS/x86_64/os/Packages/centos-release-7.3.10.1160.88.1.el7.centos.x86_64.rpm
> curl: (22) The requested URL returned error: 404 Not Found

I also copied and pasted yum.repos.d from another CentOS 7, but not exactly same version. It was 3.10.0-1062.18.1.el7.x86_64 and this one is 3.10.0-1160.88.1

None of this has worked and I am at my wits end. From what I have gleaned so far, I need an rpm named centos-release-7.3.10.1160.88.1.el7.centos.x86_64.rpm to replace the repos correctly but cannot find one.

Can anyone help?

答案1

得分: 0

以下是翻译好的内容:

你似乎混淆了CentOS版本(例如7.3)和内核版本3.10.x.y.z,并将它们与不存在的“7.3.10.1160.88”版本号串联起来,这个版本号似乎是你自己捏造的,因为它复制了随机部分,用点替换了破折号,省略了最后一个数字。

你的内核版本表明它来自CentOS 7.7的更新:
https://vault.centos.org/7.7.1908/updates/x86_64/Packages/

你的选择是从最新的版本7.9中选择一个并进行更新
http://mirror.centos.org/centos-7/7/os/x86_64/Packages/centos-release-7-9.2009.0.el7.centos.x86_64.rpm

或者选择已存档的7.7版本
https://vault.centos.org/7.7.1908/os/x86_64/Packages/centos-release-7-7.1908.0.el7.centos.x86_64.rpm

你可以直接在浏览器中浏览这些存储库,查看它们有哪些软件包。无需猜测。

英文:

You seem to be conflating the centos release (e.g. 7.3), and the kernel version, 3.10.x.y.z, and also concatenating these with overlap into the nonexistent "7.3.10.1160.88" version number, which you must have simply made up yourself, as it copies random parts, replaces dashes with dots, leaves out the last number.

Your kernel version indicates that it was from centos 7.7 updates:
https://vault.centos.org/7.7.1908/updates/x86_64/Packages/

Your options are to pick one from the latest release 7.9 and just update

http://mirror.centos.org/centos-7/7/os/x86_64/Packages/centos-release-7-9.2009.0.el7.centos.x86_64.rpm

or pick the vaulted 7.7

https://vault.centos.org/7.7.1908/os/x86_64/Packages/centos-release-7-7.1908.0.el7.centos.x86_64.rpm

You can literally just browse these repos in the browser and view what packages they have. No need to guess.

huangapple
  • 本文由 发表于 2023年8月5日 06:09:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/76839347.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定