本人最近刚开始学习Docker、在最新版Centos上安装Docker发现执行完 yum install docker-ce docker-ce-cli containerd.io后提示(尝试添加 ‘–skip-broken’ 来跳过无法安装的软件包 或 ‘–nobest’ 来不只使用最佳选择的软件包)、
错误:
问题: package docker-ce-3:19.03.8-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.13-3.1.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
(尝试添加 ‘–skip-broken’ 来跳过无法安装的软件包 或 ‘–nobest’ 来不只使用最佳选择的软件包)
经过上网查资料发现是containerd.io的缘故、在安装最新的Docker时,yum程序并没有自动安装对应的container.io程序、我们可以使用 https://download.docker.com/linux/centos/ #Docker(官方源)或者阿里云 https://mirrors.aliyun.com/docker-ce/linux/centos/7/x86_64/edge/Packages/ 进行下载安装、无论是阿里源还是Docker官方源,都只有Centos7的RPM包,所以源是没问题的
使用 yum install -y https://mirrors.aliyun.com/docker-ce/linux/centos/7/x86_64/edge/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm 命令安装最新的 containerd.io、然后就可以顺利的安装Docker了、希望此篇文章可以对你有所帮助