【问题标题】:We can't install yum update on centOS我们无法在 centOS 上安装 yum 更新
【发布时间】:2022-02-11 18:15:01
【问题描述】:

大家好,在运行 alma linux 时,大家都是 linux 新手。在我的 whm 终端中,当我运行 yum update 时,出现以下错误。

CentOS-8 - Base 24 kB/s | 282 B 00:00

错误:无法下载 repo 'BaseOS' 的元数据:无法下载 repod.xml:无法下载 repodata/repomd.xml:所有镜像都已尝试

我尝试了列出的这个解决方案,但没有成功。

第 1 步:进入 /etc/yum.repos.d/ 目录。

第 2 步:运行以下命令

sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

第 3 步:要清除所有缓存信息,请使用以下命令

yum clean all

第 4 步:现在运行 yum 更新

yum update -y

CentOS-8 - Base 24 kB/s | 282 B 00:00

错误:无法下载 repo 'BaseOS' 的元数据:无法下载 repod.xml:无法下载 repodata/repomd.xml:所有镜像都已尝试

【问题讨论】:

标签: centos8


【解决方案1】:

这可能是因为 BaseOS 存储库损坏。

# vim /etc/yum.repos.d/CentOS-Linux-BaseOS.repo

enabled=1 更改为enabled=0

删除文件 /etc/yum.repos.d/CentOS-Linux-BaseOS.repo

现在更新

#yum update -y

【讨论】:

    猜你喜欢
    • 2022-01-08
    • 2012-03-04
    • 2017-12-19
    • 1970-01-01
    • 2014-11-10
    • 2016-10-20
    • 2016-07-26
    • 2011-01-08
    • 2020-10-20
    相关资源
    最近更新 更多