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/