CentOS6 Error: All mirror URLs are not using ftp, http[s] or file.

2020-11-30开始CentOS 6已经不支持了!

如果yum installyum update的时候出现以下的错误的话要考虑看是不是CentOS6版本不支持了的缘故.

error:

1
2
3
4
5
6
Loaded plugins: fastestmirror, ovl
Setting up Install Process
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
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

自己是因为docker的关系一直用着旧的image和container,所以一直没有发觉. 一旦清空重新docker compose up的时候就因为CentOS6的关系当掉了.

解决方法是搜索最新所支持的包的url并替换掉…
或者将docker file里的CentOS版本更新.