Failed to download metadata for repo ‘appstream’: Cannot prepare internal mirrorlist: No URLs in mirror

处理办法:

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

#-O, –output-document=FILE 将文档写入 FILE。

#-o, –output-file=FILE 将日志信息写入 FILE。

yum makecache

sudo sed -i ‘s/mirrorlist/#mirrorlist/g’ /etc/yum.repos.d/CentOS-*

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