项目场景:linux无法使用yum
问题描述:
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
或者
http://mirror.centos.org/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
还有
http://mirrors.aliyun.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
原因分析:
yum源出现错误
解决方案:
1、访问中科大源:中科大(参考地址:http://mirrors.ustc.edu.cn/help/centos.html#)
2、
[base]
name=CentOS-$releasever
failovermethod=priority
baseurl=https://vault.centos.org/6.5/os/x86_64/
gpgcheck=0
repo的内容删掉,替换成这个
参考:https://www.cnblogs.com/zhangxiaofan/p/14121026.html