问题
如何修复Cannot download repodata/repomd.xml: All mirrors were tried
docker-ce。
问题
Cannot download repodata/repomd.xml: All mirrors were tried
按照yum install docker-ce
当前(截至 2021 年 12 月 13 日)Docker 文档设置 Docker yum/dnf 存储库来获取错误。
步骤和错误
$ sudo dnf -y install dnf-plugins-core
Last metadata expiration check: 0:43:20 ago on Wed 15 Dec 2021 03:47:53 AM UTC.
Package dnf-plugins-core-4.0.21-3.el8.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
$ sudo dnf config-manager \
> --add-repo \
> https://download.docker.com/linux/fedora/docker-ce.repo
Adding repo from: https://download.docker.com/linux/fedora/docker-ce.repo
$ sudo yum update
Docker CE Stable - x86_64 357 B/s | 383 B 00:01
Errors during downloading metadata for repository 'docker-ce-stable':
- Status code: 404 for https://download.docker.com/linux/fedora/8/x86_64/stable/repodata/repomd.xml (IP: 13.224.175.42)
Error: Failed to download metadata for repo 'docker-ce-stable': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
环境
用 8.4 和 8.5 复制。但是,其他 Fedora/RHEL/CentOS 也会有同样的问题。
$ cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="8.5 (Ootpa)"