如何解決在centos中安裝docker失敗

如何解決在centos中安裝docker失敗

如何解決在centos中安裝docker失敗?

CentOS?安裝 docker報錯信息:

如何解決在centos中安裝docker失敗

問題: 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)

?  檢查發現containerd.io此軟件包已經安裝,但版本是1.2.0;所以造成這種安裝失敗的原因是containerd.io軟件包版本過低

解決方法:

  1.檢查Docker版本,安裝低版本,不進行安裝新版本Docker(在此就不繁瑣介紹低版本的安裝過程了)

 [root@localhost?~]#?yum?list?docker-ce?--showduplicates?|?sort?-r    //檢查相應的軟件包版本

?如何解決在centos中安裝docker失敗

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

?    2.安裝新版的containerd.io軟件包

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    //下載相關軟件包

如何解決在centos中安裝docker失敗

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

如何解決在centos中安裝docker失敗

?  安裝完成后重新安裝Docker

  ?[root@localhost ~]# yum -y install docker-ce    //安裝Docker軟件包

如何解決在centos中安裝docker失敗

?  安裝完成后啟動Docker

[root@localhost?~]#?systemctl??start?docker      //CentOS7啟動方法 [root@localhost?~]#server??docker?start        //CentOS6啟動方法

如何解決在centos中安裝docker失敗

?   查看狀態后發現已經啟動成功

?相關推薦:docker教程

以上就是如何解決在centos中安裝

? 版權聲明
THE END
喜歡就支持一下吧
點贊8 分享