装的CentOS6.5,测试项目的时候发现yum安装报错:
![图片[1]-解决CentOS6 yum 源失效-小凡博客](https://www.mcxiaofan.cn/wp-content/uploads/2022/04/QQ截图20220401222842.png)
Loaded plugins: fastestmirror, refresh-packagekit, security
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 retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
直接改:
删除旧的:
rm -rf /etc/yum.repos.d/CentOS-Base.repo
添加新的:
vi /etc/yum.repos.d/CentOS-Base.repo
![图片[2]-解决CentOS6 yum 源失效-小凡博客](https://www.mcxiaofan.cn/wp-content/uploads/2022/04/QQ截图20220401223124.png)
[base]
name=CentOS-6
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.8/os/x86_64/
gpgcheck=0
完美解决。
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END