Tuesday, February 8, 2022

How to fix Failed to download metadata for repo in CentOS 8.x

CentOS Linux 8 had reached the End Of Life (EOL) on December 31st, 2021. It means that CentOS 8 will no longer receive development resources from the official CentOS project. After Dec 31st, 2021, if you need to update your CentOS, you need to change the mirrors to vault.centos.org where they will be archived permanently.


Step 1: Go to the /etc/yum.repos.d/ directory.

[root@autocontroller ~]# cd /etc/yum.repos.d/


Step 2: Run the below commands

[root@autocontroller ~]# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*

[root@autocontroller ~]# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*


Step 3: Now run the yum update

[root@autocontroller ~]# yum update -y

No comments:

Post a Comment

How to use ipmi command to locate B7136 HDD LED

 Locate: Hdd0:  Ipmitool –I lanplus –H BMC_IP –U root –P BMC_password raw 0x2e 0x09 0xfd 0x19 0x0 0x06 0xc2 0x00 0x01 0x01 Hdd1:  Ipmitool –...