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

Posted 07 December, 2020

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

[[email protected] 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 🙂



Show Comments (0)
© SvennD