SvennD
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
December 7, 2020

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

Posted on December 7, 2020  •  1 minutes  • 151 words  •  Suggest Changes

Greeted with this error while trying to upgrade a Centos 6 machine?

[root@server root]# yum update
Loaded plugins: fastestmirror
Setting up Update Process
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

Well bad news Centos 6 is eol ๐Ÿ™ So there will be no new updates or fixes and you should move over to Centos 7 or even better Centos 8. If you need to use yum however you can fix this :

change from mirror to vault (or mirrorlist to vault)

nano /etc/yum.repos.d/CentOS-Base.repo

From :

[base]
name=CentOS-$releasever - Basevault
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

To :

[base]
name=CentOS-$releasever - Basevault
baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

Do this for all repo’s: base, updates, extras, centosplus and contrib; and you should be able to yum a bit longer ๐Ÿ™‚

Support

If you enjoyed this website, consider buying me a Dr. Pepper

Buy me a Dr PepperBuy me a Dr Pepper