CentOS 8:问题:包 docker-ce-xxxxxx.x86_64 需要 containerd.io >= 1.4.1

CentOS 8: Problem: package docker-ce-xxxxxx.x86_64 requires containerd.io >= 1.4.1

我正在尝试升级

$ sudo yum update -y
Last metadata expiration check: 0:06:44 ago on Fri 11 Jun 2021 01:14:40 PM -05.
Error: 
 Problem: package docker-ce-3:20.10.7-3.el7.x86_64 requires containerd.io >= 1.4.1, but none of the providers can be installed
  - cannot install the best update candidate for package docker-ce-3:19.03.12-3.el7.x86_64
  - package containerd.io-1.4.3-3.1.el7.x86_64 is filtered out by modular filtering
  - package containerd.io-1.4.3-3.2.el7.x86_64 is filtered out by modular filtering
  - package containerd.io-1.4.4-3.1.el7.x86_64 is filtered out by modular filtering
  - package containerd.io-1.4.6-3.1.el7.x86_64 is filtered out by modular filtering
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
$

我正在尝试

$ sudo yum erase podman buildah
No match for argument: podman
No match for argument: buildah
No packages marked for removal.
Dependencies resolved.
Nothing to do.
Complete!
$

稍后

$ sudo yum install docker-ce docker-ce-cli containerd.io
Last metadata expiration check: 0:10:19 ago on Fri 11 Jun 2021 01:14:40 PM -05.
Package docker-ce-3:19.03.12-3.el7.x86_64 is already installed.
Package docker-ce-cli-1:19.03.12-3.el7.x86_64 is already installed.
Package containerd.io-1.2.13-3.2.el7.x86_64 is already installed.
Error: 
 Problem: package docker-ce-3:20.10.7-3.el7.x86_64 requires containerd.io >= 1.4.1, but none of the providers can be installed
  - cannot install the best candidate for the job
  - package containerd.io-1.4.3-3.1.el7.x86_64 is filtered out by modular filtering
  - package containerd.io-1.4.3-3.2.el7.x86_64 is filtered out by modular filtering
  - package containerd.io-1.4.4-3.1.el7.x86_64 is filtered out by modular filtering
  - package containerd.io-1.4.6-3.1.el7.x86_64 is filtered out by modular filtering
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
$ docker -v
Docker version 19.03.12, build 48a66213fe
$

解决方案是什么?

我解决了这个问题,在搜索 https://pkgs.org/ 中寻找 containerd

CentOS -> Docker CE Stable x86_64

https://centos.pkgs.org/8/docker-ce-stable-x86_64/containerd.io-1.4.6-3.1.el8.x86_64.rpm.html

寻找 Binary Package

复制https://download.docker.com/linux/centos/8/x86_64/stable/Packages/containerd.io-1.4.6-3.1.el8.x86_64.rpmurl

运行

$ sudo rpm -Uvh https://download.docker.com/linux/centos/8/x86_64/stable/Packages/containerd.io-1.4.6-3.1.el8.x86_64.rpm

也许你以后需要...

sudo rpm -Uvh https://download.docker.com/linux/centos/8/x86_64/stable/Packages/docker-ce-cli-20.10.7-3.el8.x86_64.rpm

sudo rpm -Uvh https://download.docker.com/linux/centos/8/x86_64/stable/Packages/docker-ce-20.10.7-3.el8.x86_64.rpm

现在,再次尝试更新

$ sudo yum update -y