CentOS 安装 Docker 报错提示requires containerd.io问题解决

1,125次阅读
没有评论

共计 1485 个字符,预计需要花费 4 分钟才能阅读完成。

问题描述

今天在使用命令安装 Docker 的时候,提示如下错误内容

[root@localhost ~]# curl -sSL https://get.daocloud.io/docker | sh
# Executing docker install script, commit: 26ff363bcf3b3f5a00498ac43694bf1c7d9ce16c
+ sh -c 'yum install -y -q yum-utils'
+ sh -c 'yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo'
添加仓库自:https://download.docker.com/linux/centos/docker-ce.repo
+ '[' stable '!=' stable ']'
+ sh -c 'yum makecache'
CentOS-8 - AppStream                                                                                                 6.5 kB/s | 4.3 kB     00:00    
CentOS-8 - Base                                                                                                      6.8 kB/s | 3.9 kB     00:00    
CentOS-8 - Extras                                                                                                    839  B/s | 1.5 kB     00:01    
Docker CE Stable - x86_64                                                                                            1.3 kB/s | 3.5 kB     00:02    
元数据缓存已建立。+ '[' -n ''']'
+ sh -c 'yum install -y -q docker-ce'
错误:问题: package docker-ce-3:19.03.10-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.10-3.2.el7.x86_64 is excluded
  - package containerd.io-1.2.13-3.1.el7.x86_64 is excluded
  - package containerd.io-1.2.13-3.2.el7.x86_64 is excluded
  - 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

错误解决

原因是 containerd.io 软件包版本太低,升级下就好

通过 Docker 官网查找最新版的 containerd.io,进去后找到自己使用的 Linux 发行版本, 我这边是 Centos

https://download.docker.com/linux/

CentOS 安装 Docker 报错提示 requires containerd.io 问题解决

查看右侧最新日期,截至到目前,最新版本为

containerd.io-1.2.13-3.2.el7.x86_64.rpm

因为我用的是 Centos8,所以使用如下命令进行安装

dnf install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.13-3.2.el7.x86_64.rpm
CentOS 安装 Docker 报错提示 requires containerd.io 问题解决

重新执行安装脚本即可

正文完
 
Hlynford
版权声明:本站原创文章,由 Hlynford 2020-05-31发表,共计1485字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)