Knowledgebase
How to fix CentOS 6 : YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Print this Article
Hi ,
Thank you for choosing Service from Host4Fun.Com.
When we run command "yum update" on our CentOS 6 VPS we are getting below error :
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
Why are we getting this error ?
CentOS 6 has reached End Of Life on the 30th November 2020. YUM attempting connect to deprecated repositories. So, we need update deprecated repositories URL’s and point to the vault.
How to solve this issue ?
To fix this problem we need to edit /etc/yum.repos.d/CentOS-Base.repo and replace all mirrorlist .
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
4. Replace mirrorlist‘s
Replace sections:
[base]
[updates]
[extras]
With below code:
[base]
name=CentOS-$releasever - Base
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
# baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=https://vault.centos.org/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
# released updates
[updates]
name=CentOS-$releasever - Updates
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
# baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=https://vault.centos.org/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
# additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
# baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=https://vault.centos.org/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
5. Clean yum cache
# yum clean all
6. Run again yum update command:
# yum update
Now we can update CentOS 6 without issue.
Becoming EOL/End Of Life means it will no longer be supported by the Linux community with security patches, vulnerabilities, or bug fixes. Therefore, continuing to use CentOS 6 after November could pose a significant security risk. That is why it is advisable never to use EOL operating systems.
You can easily reinstall your VPS OS with CentOS 7 or CentOS 8 from our VPS Control Panel .
You can see guide how to reinstall VPS OS : https://client.host4fun.com/knowledgebase/18/How-to-reinstall-OS-of-the-VPS-.html
Thanks
Host4Fun
Was this answer helpful?
Related Articles
Hi Thank you for choosing service from Host4Fun . Go to run > cmd > slmgr.vbs /rearm and...
By default Windows Server 2008 firewall blocks ping requests. To enable please follow the...
By default Windows Server 2012 firewall blocks ping requests. To enable please follow the below...
For Guide Visit :...
How to solve “No package available” error during yum installation in Centos 7.Step : Install EPEL...