新服務器Centos 8.4在安裝docker服務時一直出現:
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] 錯誤:為 repo 'root_' 下載元數據失敗 : Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
找了很久終於找到了解決方案:
找到 /etc/yum.repos.d 目錄下的文件 root_.repo 打開后
將 enabled=1 修改為 enabled=0 保存變更內容就可以正常安裝了