Bobcares

For every $500 you spend, we will provide you with a $500 credit on your account*

BLACK FRIDAY SPECIAL

*The maximum is $4000 in credits, Offer valid till December 6th, 2024, New Customers Only, Credit will be applied after purchase and expires after six (6) months

For every $500 you spend, we will provide you with a $500 credit on your account*

BLACK FRIDAY SPECIAL

*The maximum is $4000 in credits, Offer valid till December 6th, 2024, New Customers Only, Credit will be applied after purchase and expires after six (6) months

CentOS Error No URLs in mirrorlist | Resolved

by | Dec 13, 2022

Wondering how to resolve the CentOS Error No URLs in mirrorlist error? Our Server Management Support team is here to lend a hand with your queries and issues.

How to resolve CentOS Error: No URLs in mirrorlist?

If you are using CentOS 8, you may have noticed that installing packages with yum does not work any longer and often results in an error message like this:

Error: Failed to download metadata for repo ‘appstream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist

Furthermore, this error may also occur when we use Docker container images based on CentOS 8.

This error started occurring on January 31, 2022,  as the CentOS team removed all CentOS 8 packages from the official mirrors. These packages have been moved to this link.

We can easily resolve the “CentOS Error: No URLs in mirrorlist” by migrating to CentOS Stream 8. However, if that is not a possibility at the moment, our experts have a quick solution:

We have to update the repos in /etc/yum.repos.d in order to use vault.centos.org rather than mirror.centos.org . We can do this with these commands:

CentOS Error No URLs in mirrorlist

In other words, we are replacing the base URL. Although this will resolve the error for now, we will not receive any further updates for CentOS 8. Our experts recommend upgrading to the Stream version sooner rather than later.

[Need assistance with a different issue? Our team is available 24/7.]

Conclusion

To wrap up, our Support Engineers demonstrated a quick fix for “CentOS Error: No URLs in mirrorlist”. We also learned about the reason behind this specific error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

2 Comments

  1. Robert Ehrlich

    why the “g” suffix in the sed command ?

    Reply
    • Hiba Razak

      Hello Robert,
      The s stands for substitute, while the g stands for global, which means that all matching occurrences in the line would be replaced.

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.