Centos8 不在维护,第三方的镜像站中均已移除CentOS 8的源,yum install 会报错建议更换源。
[root@localhost /etc/yum.repos.d]# yum makecache
CentOS-8.0 - AppStream 19 B/s | 38 B 00:02
CentOS-8.0 - Base 24 B/s | 38 B 00:01
CentOS-8.0 - Extras 8.4 B/s | 38 B 00:04
同步仓库 'AppStream' 缓存失败,忽略这个 repo。
同步仓库 'BaseOS' 缓存失败,忽略这个 repo。
同步仓库 'extras' 缓存失败,忽略这个 repo。
元数据缓存已建立。
[root@localhost /etc/yum.repos.d]#
备份之前的repo文件:
rename '.repo' '.repo.bak' /etc/yum.repos.d/*.repo
下载新的yum源文件:
wget https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo -O /etc/yum.repos.d/Centos-vault-8.5.2111.repo
wget https://mirrors.aliyun.com/repo/epel-archive-8.repo -O /etc/yum.repos.d/epel-archive-8.repo
运行下面命令重建缓存:
yum clean all && yum makecache