failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
异常
yum makecache
failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://mirrors.aliyun.com/centos/$releasever/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
一般而言,出现此异常的原因是变量 $releasever
未找到;
这个变量对应 yum.conf
的 distroverpkg=centos-release
配置,centos-release
从包=centos-release
zhong获取,下面是安装步骤:
# 查看对应包
rpm -qi centos-release
>>> package centos-release is not installed
# 下载包,需要找到对应版本的包
wget http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/centos-release-7-9.2009.0.el7.centos.x86_64.rpm
# 安装
rpm -Uvh --replacepkgs centos-release-7-9.2009.0.el7.centos.x86_64.rpm
# 再次查看
rpm -qi centos-release
>>>
Name : centos-release
Version : 7
Release : 9.2009.0.el7.centos
Architecture: x86_64
Install Date: Tue 14 Feb 2023 11:32:53 AM CST
Group : System Environment/Base
Size : 44787
License : GPLv2
Signature : RSA/SHA256, Mon 26 Oct 2020 08:40:20 PM CST, Key ID 24c6a8a7f4a80eb5
Source RPM : centos-release-7-9.2009.0.el7.centos.src.rpm
Build Date : Fri 23 Oct 2020 10:53:59 PM CST
Build Host : x86-01.bsys.centos.org
Relocations : (not relocatable)
Packager : CentOS BuildSystem <http://bugs.centos.org>
Vendor : CentOS
Summary : CentOS Linux release file
Description :
CentOS Linux release files
再次运行 yum clean all && yum makecache
即可
« 上一篇: java.lang.IllegalStateException: org.apache.rocketmq.remoting.exception.RemotingSendRequestException: send request to <192.168.1.126:9876> failed
» 下一篇: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/repodata/repomd.xml: [Errno -1] pygpgme is not working so repomd.xml can not be verified for kubernetes Trying other mirror.
» 下一篇: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/repodata/repomd.xml: [Errno -1] pygpgme is not working so repomd.xml can not be verified for kubernetes Trying other mirror.
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10亿数据,如何做迁移?
· 推荐几款开源且免费的 .NET MAUI 组件库
· 清华大学推出第四讲使用 DeepSeek + DeepResearch 让科研像聊天一样简单!
· 易语言 —— 开山篇
· Trae初体验