Could not resolve host: mirrorlist.centos.org on CentOS Stream 8


INTRODUCTION

On 2024-05-31 the CentOS Stream 8 beta OS became End of Life (EOL)

Red Hat has removed the mirrors from the internet.
They can still be accessed via vault.centos.org/8-stream for the time being as of the writing of the KB article.
Without updating the repository URLs, packages will be unable to be updated or validated, resulting in the error above.

When running various functions such as MultiPHP or command that utilize the yum system, errors similar to the following are produced:

Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=AppStream&infra=stock [Could not resolve host: mirrorlist.centos.org]


IMPORTANT

Using the CentOS vault repository IS NOT to be used for staying on CentOS Stream 8 for any longer than is required to migrate to a new server.
Packages provided by the vault repository do not get any updates and where beta versions.
This means that the software installed from the Vault repository will have unpatched security vulnerabilities and other defects normally found in beta software.


READ ME FIRST

This article is provided as a courtesy.
Installing, configuring, and troubleshooting third-party applications is outside the scope of basic support provided by Starburst Services.

We are not liable for any damages and/or data loss.


REQUIRMENTS

  • SSH credentials or File Manager access Logged In as Root
  • Text editor of your choice (The example uses nano)

THIS IS ONLY A TEMPORARY WORKAROUND

PROCEDURE

This is similar to the procedure on:
Could not retrieve mirrorlist http://mirrorlist.centos.org/ on CentOS 7 – Starburst Services Knowledge Base

As such, we are not going to rewrite the entire KB article on every alpha and beta operating system Red Hat releases, and then archives when the next version comes out.

Currently they are on Fedora 41 (alpha), and Stream 10 (beta).

You will still edit your used .repo files in /etc/yum.repos.d with nano, or your choice of text editor.

Replacing the current baseurl=http://mirrorlist.centos.org/ with https://vault.centos.org/


After editing all your used .repos, run the following command:

yum clean all

It is recommended, that if you are using any operating system in a Production Environment, that you use a Stable Release.

As such, if you where using the beta operating system Stream 8 or 9, that you switch to one of the many options out there.


If migrating to AlmaLinux, please visit the AlmaLinux ELevate page at:

https://almalinux.org/elevate


KB Article Created: 2024-07-16

people found this article helpful. What about you?