Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to download metadata for repo appstream

Tags:

centos

centos8

Running on centos 8 today want to install new package and before it wants to run:

yum update -y

but got this:

Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

Then I did search and found a solution to fix it:

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

I did this but still error persist, any idea? how to fix this? Is there new solution in 2022?

After use this solution

Now error:

Errors during downloading metadata for repository 'extras':

  • Status code: 403 for https://vault.centos.org/centos/8/extras/x86_64/os/repodata/repomd.xml (IP: 13.249.9.66) Error: Failed to download metadata for repo 'extras': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
like image 649
tour travel Avatar asked Jan 19 '26 07:01

tour travel


1 Answers

The CentOS 8 reaching its end of life, the content from the CentOS 8 repositories has been moved to vault.centos.org. Please update your CentOS yum repository paths from 'mirror.centos.org' to 'vault.centos.org' to resolve the issue.

like image 109
Mohammad Haseeb Avatar answered Jan 21 '26 04:01

Mohammad Haseeb



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!