Centos8 yum 源不可用
报错: CentOS Linux 8 - AppStream Cannot prepare internal mirrorlist: No URLs in mirrorlist
解决:
1.将以下三个yum源文件中的 mirrorlist行注释掉,baseurl行打开,且将访问主机修改为腾讯云地址即可:
CentOS-Linux-AppStream.repo
CentOS-Linux-BaseOS.repo
CentOS-Linux-Extras.repo
具体如下:
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=AppStream&infra=$infra
baseurl=http://mirrors.cloud.tencent.com/$contentdir/$releasever/AppStream/$basearch/os/
2.执行以下命令,清理和重新缓存源设置即可
yum clean all
yum makecache
PS: