0

From what I can tell, started this morning from a fresh centos container.

[root@2804aec3e418 /]# yum update
Failed to set locale, defaulting to C.UTF-8
CentOS Linux 8 - AppStream                                                                                                                                     59  B/s |  38  B     00:00    
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
[root@2804aec3e418 /]# 
2

1 Answer 1

4

As this question has been closed, and the answers are not the best option, I am writing it here.

Your image or the base image you rely on uses CentOS Linux 8, which has reached EOL.

You should move to use a newer image or if you directly use CentOS Linux 8, switch to another base image.

In case you are forced for now to keep using it. You can switch to use the old repositories and then switch to the CentOS Stream 8 repositories with:

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

dnf update -y; \
dnf --disablerepo '*' --enablerepo extras swap centos-linux-repos centos-stream-repos -y; \
dnf distro-sync -y;

The switch to CentOS Stream 8 is documented in https://www.centos.org/centos-stream/:

CentOS Linux 8 to CentOS Stream 8

3
  • 1
    Might you question why that similar question was closed and why this one will be, too?
    – Rob
    Feb 1, 2022 at 11:44
  • 1
    Yes, but as they are not deleted, I think it is nicer to have a better answer, as many people will reach these questions. If they would be deleted (what would avoid having wrong practices around this site and the internet) would be better, but just closing something and letting it there, may cause more damage than benefit IMO Feb 1, 2022 at 13:28
  • My point is that the other question is closed as off topic so that's the first indication this is off topic, too, and should be closed, not answered. Do not answer off topic questions. How to Answer
    – Rob
    Feb 1, 2022 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.