centos下yum执行报错:Failed to download metadata for repo 'AppStream': Cannot prepare internal mirrorlist: No URLs in mirrorlist


 查看centos版本

cat /etc/centos-release

 

 下载新的CentOS.repo

根据自己的centos版本下载对应的,可在 https://mirrors.aliyun.com/repo/ 下查看已有aliyun已提供的版本。之前下载的 Centos-8.repo 后,仍会一直报各种安装更新错误找不到源的情况,改为 Centos-vault-8.5.2111.repo ,问题就不存在了。

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

运行 yum makecache 生成缓存

yum makecache

 

参考地址:

https://blog.csdn.net/csdn2561/article/details/122902764


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM