How to fix CentOS 5 error: YumRepo Error: All mirror URLs are not using ftp, http[s] or file

ATTENTION!!! Read article about CentOS 6 YumRepo error: How to fix CentOS 6 error: YumRepo Error: All mirror URLs are not using ftp, http[s] or file

In this article i will show how to fix yum update error: YumRepo Error: All mirror URLs are not using ftp, http[s]

Problem

When trying update CentOS 5 with yum update command getting error:

Loaded plugins: aliases, allowdowngrade, changelog, dellsysid, downloadonly, fastestmirror, filter-data, kernel-module, keys, kmod, list-data, merge-conf, priorities, protect-packages, : protectbase, refresh-updatesd, security, tmprepo, tsflags, upgrade-helper, verify, versionlock 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/addons/mirrorlist.txt Error: Cannot find a valid baseurl for repo: addons
YumRepo Error All mirror URLs are not using ftp http

Cause

CentOS 5 reached end of life in 2017. YUM attempting connect to deprecated repositories. So, we need update deprecated repositories URL’s and point to the vault.

Resolution

To fix this problem you edit /etc/yum.repos.d/CentOS-Base.repo and replace all mirrorlist and replace with:

baseurl=http://vault.centos.org/5.11/os/$basearch
or
baseurl=http://vault.centos.org/5.11/updates/$basearch

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. 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/5.11/os/$basearch
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
exclude=redhat-logos

5. Clean yum cache

# yum clean all

6. Run again yum update command:

# yum update

That’s It

Discuss article in ArsTech Forum

   

If you like what you are reading, please:

Buy me a coffeeBuy me a coffee

arstech

3 Comments

  1. Thanks at all
    I could update the 5.11 Final versión of Linux,
    We had to change the releasever parameter by 5.11, directly in the yum.conf.

Leave a Reply