CentOS7 mirrorlist.centos.org won't update anymore? Print

  • centos, centos7, mirrorlist.centos.org
  • 13

If your CentOS7 does not update, it's of course because CentOS is no longer supported. The default mirrors do not even exist anymore on the CentOS home servers. You will likely see errors like this if you try to run an update on your CentOS operating system:

Could not resolve host: mirrorlist.centos.org; Unknown error

There is a lifeline for the time being, just change the REPO file by running these three commands:

sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-*.repo
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-*.repo
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-*.repo


After this, you should be able to run the update again:

yum -y update

Keep in mind, it's likely there are no updates available. If they do add updates for CentOS7, this would be the place to get them.

If you can update to AlmaLinux, we highly recommend this. We also understand some instances require you to stay put, no matter what CentOS has in store.


Was this answer helpful?

« Back