首頁 > 軟體

CentOS 安裝 Docker 報錯及解決過程

2020-06-16 16:30:54

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    //檢查相應的軟體包版本

 

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

 

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

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

   安裝完成後重新安裝Docker

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

   安裝完成後啟動Docker

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

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

    檢視狀態後發現已經啟動成功


IT145.com E-mail:sddin#qq.com