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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With