首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未能在CentOS 8中运行yum更新

未能在CentOS 8中运行yum更新
EN

Server Fault用户
提问于 2022-02-16 23:14:14
回答 2查看 14.6K关注 0票数 5

我想用这个免责声明作为这篇文章的序言:我对yum的功能有些陌生,我也不熟悉自从CentOS 8成为EOL以来所需要的更改的细节。

大约一个月前,我的容器构建无法成功运行,因为当我要更新时,我得到了一个错误。我在这里找到了解决方案,并将其添加到我的容器构建中:

代码语言:javascript
复制
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*

这件事让我度过了一段时间,直到今天,它似乎又崩溃了。

代码语言:javascript
复制
bash-4.4# yum update
CentOS Linux 8 - AppStream                                                                                                                                                                                   149 kB/s | 8.4 MB     00:58
CentOS Linux 8 - BaseOS                                                                                                                                                                                      113 kB/s | 4.6 MB     00:41
CentOS Linux 8 - Extras                                                                                                                                                                                      716  B/s |  10 kB     00:14
CentOS Linux 8 - PowerTools                                                                                                                                                                                  0.0  B/s |   0  B     01:26
Errors during downloading metadata for repository 'powertools':
  - Curl error (28): Timeout was reached for http://vault.centos.org/centos/8/PowerTools/x86_64/os/repodata/981185e5d80d51024e5246ed47f7f69605160518c22103379bb71376e2dccb14-filelists.xml.gz [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds]
  - Curl error (28): Timeout was reached for http://vault.centos.org/centos/8/PowerTools/x86_64/os/repodata/4b94ac0555ec1e15718dd9d77f995ec7096d98974b4c7a427b8e03c20e9c663d-primary.xml.gz [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds]

所以我找到了一些其他的解决方案,但都没有奏效。例如,我找到了这篇文章:CentOS 8旅-如何解决警告:装入失败/etc/yum.Storage.d/CentOS-AppStream.repo‘,跳过

它让我做了以下几点:

代码语言:javascript
复制
dnf --disablerepo '*' --enablerepo extras swap centos-linux-repos centos-stream-repos

dnf发行版同步

但有了这个,我明白了:

代码语言:javascript
复制
    bash-4.4# dnf --disablerepo '*' --enablerepo extras swap centos-linux-repos centos-stream-repos
CentOS Linux 8 - Extras                                                                                                                                                                                       22 kB/s |  10 kB     00:00
Error:
 Problem 1: conflicting requests
  - nothing provides centos-gpg-keys = 1:8-3.el8 needed by centos-stream-repos-8-3.el8.noarch
 Problem 2: package centos-linux-release-8.3-1.2011.el8.noarch requires centos-repos(8), but none of the providers can be installed
  - conflicting requests
  - problem with installed package centos-linux-release-8.3-1.2011.el8.noarch
  - nothing provides centos-gpg-keys = 1:8-3.el8 needed by centos-stream-repos-8-3.el8.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

如果我给出的条件是我不能更改这个容器的基本图像(CentOS 8),那么短期的解决方案是什么?我知道长期的解决方案是切换我的操作系统,但我需要一瘸一拐地前进一小段时间。

提前谢谢你!

EN

回答 2

Server Fault用户

回答已采纳

发布于 2022-02-17 00:17:09

vault.centos.org背后的潜艇很可能永远都是片状的。

RedHat几乎没有支持它的动力。它是为存档的社区版本的他们的主要操作系统,完全相同的社区版本,使EOL有利于CentOS流。

作为详细的这里,您可能希望使用更可靠的vault.epel.cloud

代码语言:javascript
复制
sed -i 's|baseurl=http://vault.centos.org|baseurl=http://vault.epel.cloud|g' /etc/yum.repos.d/CentOS-Linux-*
票数 8
EN

Server Fault用户

发布于 2022-02-17 13:13:33

将你的容器从CentOS 8中移开,因为它是生命的终结。不要用Vault。

几种选择。通用基础图像(UBI 8)直接从红帽。基于EL8的容器重建,至少阿尔玛和洛基也有这些。

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1093922

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档