解决CentOS8 下载元数据失败的问题
详细问题:
<div>$ sudo yum update
CentOS Linux 8 - AppStream 0.0B/s | 0B 00:00
Errors during downloading metadata for repository 'appstream':
- Curl error (6): Couldn't resolve host name for http://mirror.cloud.aliyuncs.com/centos-vault/8.5.2111/AppStream/x86_64/os/repodata/repomd.xml </div>
错误:为仓库 'appstream' 下载元数据失败 :
Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
下载最新的repo文件,从阿里云下载
<div>sudo wget https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo -O /etc/yum.repos.d/Centos-vault-8.5.2111.repo
sudo wget https://mirrors.aliyun.com/repo/epel-archive-8.repo -O /etc/yum.repos.d/epel-archive-8.repo</div>
<div>sed -i 's/mirrors.cloud.aliyuncs.com/mirrors.aliyun.com/g'/etc/yum.repos.d/Centos-vault-8.5.2111.repo
sed -i 's/mirrors.cloud.aliyuncs.com/mirrors.aliyun.com/g'/etc/yum.repos.d/epel-archive-8.repo</div>
<div>yum clean all && yum makecache</div>
测试
sudo yum update
Centos8 已经停止维护了,目前唯一能维护的 Centos 版本是 Centos7.9(或者试试 CentosStream,不过那玩意儿太大了)
因为停止维护,所以官方把所有的 iso,镜像等等全都下架了
想要解决,有 2 种办法:
[*] 换源,比较麻烦,不推荐,如果你实在想用 Centos8,我可以说怎么换
[*] 重装,装一个 Centos7.9,7.9 仍然在维护中,只不过 2024 年将会停维,算了,有啥用啥
个人观点,勿喷
页:
[1]