Linode's CentOS 7 mirror is no longer available
When I try to update my CentOS 7 Linode, I get the following error from the Linode mirrors:
# yum update
...
failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://mirrors.linode.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
How do I update CentOS 7?
3 Replies
✓ Best Answer
CentOS 7 officially reached end-of-life (EOL) status on June 30, 2024 (source: Red Hat). This was announced a few years ago, along with the CentOS project announcing their focus shift to CentOS Stream.
Since security updates will no longer be provided, the recommended solution is to migrate to a different supported distribution now that Red Hat has finally ended support for CentOS 7.
This EOL status means that the official upstream repositories have also dropped support for CentOS 7, along with our repository mirrors (which just mirror upstream). However, you can use the repository archives if you wish.
The CentOS Vault Mirror is available with the following caveats:
This is NOT an updated tree for installing CentOS Linux : It is a snapshot of the older trees that have been removed from the main CentOS servers as new point releases are released.
This is provided for reference and to provide access to older archived versions, and we do not put security updates into the trees on this server.
Please see this link for active versions of CentOS Linux
You can grep for which repo configuration files contain our mirrors:
# grep -l -R http://mirrors.linode.com /etc/yum.repos.d/
/etc/yum.repos.d/CentOS-fasttrack.repo
/etc/yum.repos.d/CentOS-CR.repo
/etc/yum.repos.d/CentOS-Base.repo
Changing every instance of http://mirrors.linode.com
to https://vault.centos.org
in these files (some files may reference our mirrors more than once) should allow you to continue downloading packages from the vault (although no more security updates will be provided, per the above caveats).
Alternatively, I put together a sed
one-liner to automatically replace http://mirrors.linode.com
with https://vault.centos.org
in the appropriate yum configuration files in /etc/yum.repos.d/
.
Use at your own risk!
sed -i 's/http\:\/\/mirrors\.linode\.com/https\:\/\/vault\.centos\.org/g' /etc/yum.repos.d/*.repo
Once your repo configuration files have had all instances of http://mirrors.linode.com
changed to https://vault.centos.org
, you should be able to yum update
again.
If you're using other repositories that have dropped support for CentOS 7, you'll likely need to find other sources for the software you obtained from them (such as the EPEL repos by the Fedora Project).
Thanks for answering it.
It seems Linode’s CentOS 7 mirror is down. Update your repo URLs to a different mirror, like CentOS Vault. Edit /etc/yum.repos.d/CentOS-Base.repo to replace the base URL, then clean the cache and try updating again.