One of the configured repositories failed (未知), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this:
CENTOS7安裝更新報錯。

決方法
備份數據:首先將 /etc/yum.repos.d/ 的文件進行備份
將 /etc/yum.repos.d/的文件全部刪除
更換阿里鏡像源
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
更換鏡像源后可能出現識別不了$releasever的問題,以下是解決方法
安裝 yum install centos-release,在**/etc/yum.repos.d生成了新的源文件CentOS-Base.repo.rpmnew**,修改覆蓋之前的文件mv CentOS-Base.repo.rpmnew CentOS-Base.repo
重新執行更換阿里鏡像源的 curl 命令
運行yum makecache生成緩存
原文鏈接:https://blog.csdn.net/weixin_43897590/article/details/140384890

浙公網安備 33010602011771號