Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path
yum安装软件报错[root@localhost local]# yum -y install gccLoaded plugins: fastestmirror, refresh-packagekit, securityDetermining fastest mirrorsYumRepo Error: All mirror URLs are not using ftp, http[s] or fi
yum安装软件报错
[root@localhost local]# yum -y install gcc
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
查找解决办法时说是repomd文件没有找到,这会导致yum命令无法检索存储库元数据(或者理解为找不到库);即需要让yum命令能找到这个文件,
解决办法:更换yum源
mv /etc/yum.repos.d/* /tmp/
备份源文件
cd /etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
下载yum源文件
vim CentOS-Base.repo
修改文件中的源地址
改为vault.centos.org
改为https://vault.centos.org/6.5/os/x86_64/
sudo yum clean all && yum makecache
释放yum的缓存
yum -y install lrzsz yum就可以使用了

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐
所有评论(0)