Friday, 4 February 2022

YumRepo Error: All mirror URLs are not using ftp, http[s] or file in Cent Os 6

Error

[root@localhost ~]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. </html>/
removing mirrorlist with no valid mirrors: /var/cache/yum/i386/6/base/mirrorlist.txt 

Error: Cannot find a valid baseurl for repo: base

Fix

Be sure that you can ping vault.centos.org


Then edit /etc/yum.repos.d/CentOS-Base.repo


Comment out mirrorlist and uncomment baseurl


Change all


baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/

to


   baseurl=http://mirror.nsc.liu.se/centos-store/6.10/os/$basearch/


yum clean all

yum update -y 

Enjoy!!!!