centos8 appstream大坑Failed to download metadata for repo appstream: Cannot prepare internal mirrorlis

Posted 辉常努腻

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos8 appstream大坑Failed to download metadata for repo appstream: Cannot prepare internal mirrorlis相关的知识,希望对你有一定的参考价值。

failovermethod=priority错误
你先进到 /etc/yum.repos.d这个地方
这个错误也顺带记录一下
这个错误是因为现在不需要这一项配置了
解决方法很简单
删掉就完事了
找到这个是那个文件夹的 直接把这一行给注释掉就完事了

来自官方解释:

CentOS Linux 8 had reached the End Of Life (EOL) on December 31st, 2021. It means that CentOS 8 will no longer receive development resources from the official CentOS project. After Dec 31st, 2021, if you need to update your CentOS, you need to change the mirrors to vault.centos.org where they will be archived permanently.
CentOS Linux 8已于2021年12月31日到达生命的尽头(EOL)。这意味着CentOS 8将不再从官方CentOS项目获得开发资源。在2021年12月31日之后,如果您需要更新您的CentOS,您需要将镜像更改到vault.centos.org,在那里它们将被永久存档。

链接地址: Failed to download metadata for repo ‘AppStream’ [CentOS] - Techglimpse.
解决方案:依次执行以下语句

cd /etc/yum.repos.d/
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-*
yum update

Step 1: Go to the /etc/yum.repos.d/ directory.

[root@autocontroller ~]# cd /etc/yum.repos.d/

Step 2: Run the below commands

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

Step 3: Now run the yum update

[root@autocontroller ~]# yum update -y

That’s it!

以上是关于centos8 appstream大坑Failed to download metadata for repo appstream: Cannot prepare internal mirrorlis的主要内容,如果未能解决你的问题,请参考以下文章

Failed to download metadata for repo ‘AppStream’ [CentOS8]

CentOS8的源在2021年12月31日停止服务: Failed to download metadata for repo ‘appstream‘: 解决办法

CentOS8的源在2021年12月31日停止服务: Failed to download metadata for repo ‘appstream‘: 解决办法

Centos8 yum 报错 Error: Failed to download metadata for repo 'appstream': Cannot prepare inter

关于 CentOS8出现“Error: Failed to download metadata for repo ‘AppStream‘: xxxx” 的解决方法

问题解决:Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist:...