記一次CentOS Install 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啟動方法 

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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM