Yum no longer working on CentOS 7

Hello,

I opened YumExt today to check for updates and I got a fatal error,

Cannot find a valid baseurl for repo: base/7/x86_64

I read a bit about this an commented out the mirrorlist= entries in all of the .repo files and uncommented the baseurl= entries.

Now I get a different message,

failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

Is there a way to fix this issue?

Thanks,

LMHmedchem

Centos 7 went EOL last month.

http://mirror.centos.org/centos/7/readme

3 Likes

There will be no future updates for CentOS 7 (so you could stop checking).

The proper solution would be to upgrade to a supported version (i.e. CentOS 9 Stream).

Alternatively, pay one of the usual vendors to provide extended support for EL7 and/or one of its derivatives.

You may be able to hang on to the unsupported, and no longer receiving security updates, system you are trying to use by changing the baseurl value from mirrors… to vault…, but I would strongly recommend moving forward, and, as mentioned before, there will be no updates (so you can simply stop checking).

3 Likes

Thanks for the reply. A stream OS is not going to work in my case so I will have to look at other options fairly soon.

AlmaLinux or RockyLinux are recommended and have porting guides.

Added #centos-7-migration

Moving to a newer CentOS/RHEL/Alma/etc can be hard for multiple reasons, mostly usually due to hardware or software (python2, etc) which is no longer supported in that RHEL. My recommendation is the following:

  1. Look at mirroring the data from a vault archive.
  2. Use a config like the following for temporary access or to mirror from:
# CentOS-EOL.repo
#
# This is an example config which can be used to deal with EOL RHEL
# You MUST look to mirroring this locally if you want long term access
#

[base]
name=CentOS-$releasever - Base
baseurl=http://archive.kernel.org/centos-vault/7.9.2009/os/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://archive.kernel.org/centos-vault/7.9.2009/updates/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://archive.kernel.org/centos-vault/7.9.2009/extras/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://archive.kernel.org/centos-vault/7.9.2009/centosplus/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

2 Likes