Docker安装时出现requires containerd.io >= 1.2.2-3错误

最近更新时间 2020-02-22 20:39:37

在 CentOS 8 中安装 Docker 时可能会遇到如下错误:

Last metadata expiration check: 0:37:43 ago on Sat 22 Feb 2020 07:40:15 PM CST.
Error: 
 Problem: package docker-ce-3:19.03.6-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed
  - cannot install the best candidate for the job
  - package containerd.io-1.2.10-3.2.el7.x86_64 is excluded
  - package containerd.io-1.2.2-3.3.el7.x86_64 is excluded
  - package containerd.io-1.2.2-3.el7.x86_64 is excluded
  - package containerd.io-1.2.4-3.1.el7.x86_64 is excluded
  - package containerd.io-1.2.5-3.1.el7.x86_64 is excluded
  - package containerd.io-1.2.6-3.3.el7.x86_64 is excluded
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages) 

最新的 docker-ce 需要安装最新的 containerd.io ,可以查看安装包,应该版本不够,如下所示:

dnf list containerd.io --showduplicates | sort -r
Last metadata expiration check: 0:41:51 ago on Sat 22 Feb 2020 07:40:15 PM CST.
containerd.io.x86_64            1.2.0-3.el7                     docker-ce-stable
containerd.io.x86_64            1.2.0-2.2.rc.2.1.el7            docker-ce-stable
containerd.io.x86_64            1.2.0-2.0.rc.0.1.el7            docker-ce-stable
containerd.io.x86_64            1.2.0-1.2.beta.2.el7            docker-ce-stable
Available Packages

有两种解决方案,一种是安装低版本 docker-ce 。

dnf install docker-ce-3:18.09.1 docker-ce-cli-1:18.09.1 containerd.io

另外一种是安装最新的 containerd.io-1.2.6:https://download.docker.com/linux/centos/7/x86_64/stable/Packages/ 

rss_feed