Centos安装Docker时出现的一些问题

在根据Docker官网描述的安装方法,在centos中出现了点小问题,也不算什么吧,其实就是依赖不对。

问题: package docker-ce-3:19.03.2-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.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)

解决方法:

1.检查Docker版本

安装低版本,不要最新安装新版本Docker,明显写着需要大于多少  containerd.io >= 1.2.2-3

2.安装新版的containerd.io软件包

containerd.io软件包下载地址:https://download.docker.com/linux/centos/7/x86_64/edge/Packages

// 下载相关软件包
[root@localhost ~]#wget https://download.docker.com/linux/centos/7/x86_64/edge/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm

// 升级containerd.io软件包
[root@localhost ~]# yum -y install containerd.io-1.2.6-3.3.el7.x86_64.rpm

至此,相信问题得到彻底解决,进行安装docker即可,后面的安装步骤就不详细说明了

你可能感兴趣的:(Centos安装Docker时出现的一些问题)