Due to CentOS 6 EOL (End of Life) we are facing to some errors. In this article let’s go inside yumrepo error in CentOS 6.
CentOS 6:: YumRepo Error: All mirror URLs are not using ftp, http[s]
If you are encountering the “YumRepo Error: All mirror URLs are not using ftp, http[s]” issue in CentOS 6, it means that the repository URLs specified in the Yum configuration files are not accessible or are incorrectly formatted. This error can prevent you from installing or updating packages using Yum.
Loaded plugins: fastestmirror, refresh-packagekit, security 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
Here are some steps you can take to fix this issue:
1. First, Start with checking Yum configuration files:
Check the Yum configuration files located in the /etc/yum.repos.d/ directory. Look for
/etc/yum.repos.d/CentOS-Base.repo
If there is no typos or mistakes lets do an update of CentOS-Base.repo
2. Backup the current file:
# cp CentOS-Base.repo CentOS-Base.repo.bak
3. Edit the repo file:
# vi CentOS-Base.repo
We will use a text editor like vi or nano to open and edit the configuration files.
4. Fix the following sections in repo-file:
[base][updates][extras]
The new sections are given below:
[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:
Sometimes, the Yum cache after new config may be causing the mirror URLs error. You have to try cleaning the Yum cache by running the following command:
# yum clean all
6. Start an update of CentOS 6:
# yum update
This will update the Yum package manager and its dependencies, which may help resolve any underlying issues causing the mirror URLs error.