(CentOS-8) Error: Failed to download metadata for repo ‘appstream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist

While migrating my kubernetes cluster from Docker runtime engine to CRI-O, I faced error below,

[root@cntmaster ~]# yum update
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

This error occured since I am using old CentOS 8 which is EOL from Dec 31 onwards. So I need to migrate my systems to CentOS 8 Stream.

Solution

To resolve this, I followed official guidelines by CentOS project, whereby I need to disable all exiting repos and enable new stream repos.

[root@cntworker centos]# dnf --disablerepo '*' --enablerepo extras swap centos-linux-repos centos-stream-repos

Installed:
  centos-stream-repos-8-3.el8.noarch                                                                                                                                                                                                    
Removed:
  centos-linux-repos-8-3.el8.noarch                                                                                                                                                                                                     

Complete!

[root@cntworker centos]# dnf distro-sync

Although, CentOS is EOL now, so easiest and best approach is migrate my cluster to Ubuntu or any other LTS distribution, But I am too lazy to do that. Cheers 🙂

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

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