CentOS 7.4: How to resolve error – Could not resolve host: mirrorlist.centos.org

CentOS

Today I started one very old server which has the CentOS 7.4. When I try to update it I faced an error – Could not resolve host: mirrorlist.centos.org. I tried to ping this domain and found that it doesn’t exists anymore. As a result I can’t upgrade my installation. To resolve this you need to upgrade your repos with the new domains..

The domain should be updated from mirror.centos.org to vault.centos.org and mirrorlist urls should be commented

You can do this by using next steps.

First of login as root user and make a backup of the repos folders

Then fix the domains with the next sed commands which you need execute one by one

Now you can clean up yum cache and update the system

You May Also Like

About the Author: vo