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

Posted 看,未来

tags:

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

大家都知道Centos8于2021年年底停止了服务,大家再在使用yum源安装时候,出现下面错误“错误:Failed to download metadata for repo ‘AppStream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist”

1、进入yum的repos目录

cd /etc/yum.repos.d/

2、修改所有的CentOS文件内容

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源为阿里镜像

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo

yum clean all

yum makecache

4、yum安装测试是否可以yum安装

yum install wget –y

这个问题解决花了半个小时,越来越讨厌那些哔哔半天讲不到点上的了。教程能用就能用,不能用就是过期了,一些 debug 的文章非要绕来绕去绕来绕去。

创作打卡挑战赛 赢取流量/现金/CSDN周边激励大奖

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

解决 spring boot Failed to decode downloaded font

解决:Failed to download metadata for repo ‘base‘

解决 spring boot Failed to decode downloaded font

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

layui图标不显示 提示Failed to decode downloaded font解决办法

Unity3D发布WebPlayer时Failed to download data file解决方案