Palito
Palito

Reputation: 1

We can't install yum update on centOS

Hi everyone am new to linux when am running alma linux. In my whm terminal when i run yum update i get this error below.

CentOS-8 - Base 24 kB/s | 282 B 00:00

Error: Failed to download metadata for repo 'BaseOS': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

I tried this solution listed but didnt work out .

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

Step 2: Run the below commands

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-*

Step 3: To clean all cached information, use the following command

yum clean all

Step 4: Now run the yum update

yum update -y

CentOS-8 - Base 24 kB/s | 282 B 00:00

Error: Failed to download metadata for repo 'BaseOS': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

Upvotes: 0

Views: 14295

Answers (1)

santhosh j
santhosh j

Reputation: 111

It might be because of the BaseOS broken repository.

# vim /etc/yum.repos.d/CentOS-Linux-BaseOS.repo

change enabled=1 to enabled=0

or

remove the file /etc/yum.repos.d/CentOS-Linux-BaseOS.repo

Now update

#yum update -y

Upvotes: 1

Related Questions