Centos8 Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist:

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 -y

 如果wget命令不存在

/usr/bin/yum install wget

 使用阿里源

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

猜你喜欢

转载自blog.csdn.net/qq_29752857/article/details/132001643