
输出的语句:
Warning: failed loading '/etc/yum.repos.d/CentOS-Base.repo', skipping.
令人瞩目。
这说明我们之前的换源方法不能正常用于centos8。在查阅了多方资料后,找到了解决方案:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
sed -i 's/$releasever/8/g' /etc/yum.repos.d/CentOS-Base.repo
yum clean all #清理缓存
yum makecache #更新源
依次执行这些命令,就可以解决问题。

网友评论