解决Failed to download metadata for repo ‘AppStream’

# 备份 yum.repos.d 目录
mv /etc/yum.repos.d/ /etc/yum.repos.d.old/
# 修改源链接
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
# 将 mirror.centos.org 改成 vault.centos.org
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

 

via:https://www.cnblogs.com/EthanWong/p/15932675.html

posted @ 2022-03-16 11:24  Nihaorz  阅读(335)  评论(0编辑  收藏  举报