repo 'root_': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

created at 09-12-2021 views: 1017

problem

The new server Centos 8.4 keeps prompting this error while installing the docker service:

yum update -y
created by dnf config-manager from file:///root/                                                0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'root_':
  - Curl error (37): Couldn't read a file:// file for file:///root/repodata/repomd.xml [Couldn't open file /root/repodata/repomd.xml]
Error: Failed to download metadata for repo'root_': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

After searching for a long time, I finally found a solution:

solution

  1. Find the file root_.repo in the /etc/yum.repos.d directory after opening
  2. Change enabled=1 to  enabled=0
  3. save the changes, and you can install normally
created at:09-12-2021
edited at: 06-04-2022: