今天发现阿里云服务器上的yum源不能用了。
# yum install net-tools -y CentOS-8 - AppStream 7.9 kB/s | 2.3 kB 00:00 Errors during downloading metadata for repository 'AppStream': - Status code: 404 for http://mirrors.cloud.aliyuncs.com/centos/8/AppStream/x86_64/os/repodata/repomd.xml (IP: 100.100.2.148) Error: Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
解决思路就是删除之前的repo文件,下载新的repo文件。
cp -r /etc/yum.repos.d/* /etc/yum.repos.d-bak
rm -rf /etc/yum.repos.d/*
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo yum makecache验证之后yum源可用