How to fix CentOS 5 or 6 error: YumRepo Error: All mirror URLs are not using ftp, http[s] or file Rumi, December 6, 2020July 9, 2021 The error looks like- And here goes the resolution (please carefully update/use the exact CentOS version you are using, in my case it was CentOS 6.9) 1. Go to /etc/yum.repos.d/ directory: # cd /etc/yum.repos.d/ 2. Make copy of original file: # cp CentOS-Base.repo CentOS-Base.repo.old 3. Open and edit file with any text editor: # vi CentOS-Base.repo looks 4. After editing it should looks like: [base] name=CentOS-$releasever - Base # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os baseurl=http://vault.centos.org/6.9/os/$basearch gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 exclude=redhat-logos 5. Clean yum cache # yum clean all 6. Run again yum update command: # yum update That’s It An alternate Repo other than CentOS vault- [base] name=CentOS-$releasever - Base # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os baseurl=http://ftp.uem.br/linux/CentOS/6.10/os/$basearch gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 exclude=redhat-logos Ref: https://arstech.net/yumrepo-error-all-mirror-urls-are-not-using-ftp-https-or-file/ Administrations Configurations (Linux) CentOSCentOS 5CentOS 6RepositoryYum
Also for epel.repo use baseurl=http://archives.fedoraproject.org/pub/archive/epel/6/$basearch They have deprecated CentOS 6.x 🙁 More info: http://mirror.centos.org/centos/6/readme
I just found this on stackoverflow that worked for me echo “https://vault.centos.org/6.10/os/x86_64/” > /var/cache/yum/x86_64/6/base/mirrorlist.txt echo “http://vault.centos.org/6.10/extras/x86_64/” > /var/cache/yum/x86_64/6/extras/mirrorlist.txt echo “http://vault.centos.org/6.10/updates/x86_64/” > /var/cache/yum/x86_64/6/updates/mirrorlist.txt echo “http://vault.centos.org/6.10/sclo/x86_64/rh” > /var/cache/yum/x86_64/6/centos-sclo-rh/mirrorlist.txt echo “http://vault.centos.org/6.10/sclo/x86_64/sclo” > /var/cache/yum/x86_64/6/centos-sclo-sclo/mirrorlist.txt