Home >Operation and Maintenance >Docker >How to solve the problem of installing docker in centos

How to solve the problem of installing docker in centos

WJ
WJOriginal
2020-06-08 16:56:173428browse

How to solve the problem of installing docker in centos

How to solve the problem of failed installation of docker in centos?

CentOS installation Docker error message:

How to solve the problem of installing docker in centos

##Problem: 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)

Checked and found that the containerd.io package has been installed, but the version is 1.2.0; so this installation failed The reason is that the containerd.io software package version is too low

Solution:

 

1. Check the Docker version, install the lower version, do not install the new version of Docker (it is not complicated here) Introducing the installation process of lower versions)

 [root@localhost ~]# yum list docker-ce --showduplicates | sort -r    //检查相应的软件包版本

How to solve the problem of installing docker in centos

     [root@localhost ~]# yum -y install  docker-ce-18.06.0.ce-3.el7     //安装低版本的软件包 [object Object]

 

2. Install the new version of containerd.io software package

containerd.io软件包下载地址:https://download.docker.com/linux/centos/7/x86_64/edge/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
   [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    //下载相关软件包

How to solve the problem of installing docker in centos

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

How to solve the problem of installing docker in centos

Reinstall Docker after the installation is complete

[root@localhost ~]# yum -y install docker-ce //Install Docker Software package

How to solve the problem of installing docker in centos

After the installation is complete, start Docker

[root@localhost ~]# systemctl  start docker      //CentOS7启动方法
[root@localhost ~]#server  docker start        //CentOS6启动方法

How to solve the problem of installing docker in centos## After checking the status, it is found that it has been started successfully

Related recommendations: docker tutorial

The above is the detailed content of How to solve the problem of installing docker in centos. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn