CentOS 8问题解决:Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist:... - 元子Channel
元子
一个闲云野鹤的年轻人
元子Channel

CentOS 8问题解决: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
赞赏
# #
首页      技术折腾      CentOS 8问题解决:Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist:...

元子

文章作者

发表回复

textsms
account_circle
email

元子Channel

CentOS 8问题解决: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 mirror…
扫描二维码继续阅读
2024-06-14