You’ve installed an older CentOS version and most likely dnf fails to update or install packages. This error is due to CentOS mirror being relocated to the vault instead.

[root@av1 ~]# dnf install python3-librepo -yFailed loading plugin "osmsplugin": No module named 'librepo'CentOS Linux 8 - AppStream                                                                      426  B/s |  38  B     00:00    Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

In order to fix this error, you’ll have to rename the target mirror as follows:

sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*sed -i 's|#baseurl=|baseurl=|g' /etc/yum.repos.d/CentOS-Linux-*

Running any dnf command, updating and installing packages should be working just fine now.

Photo by Jason Dent on Unsplash

We use cookies to give you the best online experience. By agreeing you accept the use of cookies in accordance with our cookie policy.

Close Popup
Privacy Settings saved!
Privacy Settings

When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. Control your personal Cookie Services here.

Google Tag Manager
Google Tag Manager is used to purely add further content based on user preferences, to add new features and make content consumption easier and more pleasant to the user. Website should function properly without this.

Google Analytics
Google Analytics (GA4) is used to better track page views and website performance. No significant or Personally Identifiable Information data concerning the user is collected and no data is shared with other parties.
  • _ga
  • _ga_6P6WJ2T7SP

Simple Analytics
Simple Analytics is a 100% privacy friendly analytics service that helps identify user behaviour and website usage. No further data should be collected and DNT requests are properly handled.

Microsoft Clarity
Heatmaps and user behaviour tracking with no personal information collected.
  • MUID
  • MR
  • SM
  • CLID

Decline all Services
Accept all Services