CentOS8 错误:为仓库 'appstream' 下载元数据失败 : Cannot prepare internal mirrorlist: No URLs in mirrorlist

原因

CentOS 8在2022年12月31日结束了生命周期(End of Life,EoL),Linux社区已不再维护该版本。所以,原来的CentOS 8的yum源也都失效了!最终导致此问题的产生。

image

解决方案

cd /etc/yum.repos.d
rm -rf *
ls
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
yum makecache

image

posted @ 2022-09-09 18:26  mayhot  阅读(338)  评论(0编辑  收藏  举报