docker安装运行yum install docker-ce docker-ce-cli containerd.io报错

安装DOCKER引擎

具体安装步骤不会的可以参考菜鸟教程哦,写的比较详细;

安装最新版本的Docker Engine和容器,或者转到下一步安装特定版本:

运行 :$ sudo yum install docker-ce docker-ce-cli containerd.io

之后出现

错误:
 问题: package docker-ce-3:19.03.11-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
(尝试添加 '--skip-broken' 来跳过无法安装的软件包 或 '--nobest' 来不只使用最佳选择的软件包)

解决方案:
进入阿里云镜像地址:https://mirrors.aliyun.com/docker-ce/linux/centos/7/x86_64/edge/Packages/
找到你想要的或者最新的containerd.io包,拼接在阿里云地址后面,
例如:

yum install -y https://mirrors.aliyun.com/docker-ce/linux/centos/7/x86_64/edge/Packages/containerd.io-1.2.13-3.1.el7.x86_64.rpm

然后再次执行:

yum install docker-ce docker-ce-cli containerd.io

便可完成安装!
补充:如果再遇到:

file /usr/share/man/man1/docker-attach.1.gz from install of docker-ce-cli-1:19.03.11-3.el7.x86_64 conflicts with file from package podman-manpages-1.4.2-5.module_el8.1.0+237+63e26edc.noarch
  file /usr/share/man/man1/docker-build.1.gz from install of docker-ce-cli-1:19.03.11-3.el7.x86_64 conflicts with file from package podman-manpages-1.4.2-5.module_el8.1.0+237+63e26edc.noarch
  file /usr/share/man/man1/docker-commit.1.gz from install of docker-ce-cli-1:19.03.11-3.el7.x86_64 conflicts with file from package podman-manpages-1.4.2-5.module_el8.1.0+237+63e26edc.noarch
  file /usr/share/man/man1/docker-container-prune.1.gz from install of docker-ce-cli-1:19.03.11-3.el7.x86_64 conflicts with file from package podman-manpages-1.4.2-5.module_el8.1.0+237+63e26edc.noarch
  file /usr/share/man/man1/docker-container.1.gz from install of docker-ce-cli-1:19.03.11-3.el7.x86_64 conflicts with file from package podman-manpages-1.4.2-5.module_el8.1.0+237+63e26edc.noarch
  file /usr/share/man/man1/docker-cp.1.gz from install of docker-ce-cli-1:19.03.11-3.el7.x86_64 conflicts with file from package podman-manpages-1.4.2-5.module_el8.1.0+237+63e26edc.noarch

运行:

yum remove podman-manpages-1.4.2-5.module_el8.1.0+237+63e26edc.noarch

会显示:

[root@localhost qyx]# yum remove podman-manpages-1.4.2-5.module_el8.1.0+237+63e26edc.noarch
模块依赖问题

 问题 1: conflicting requests
  - nothing provides module(perl:5.26) needed by module perl-DBD-SQLite:1.58:8010020191114033549:073fa5fe-0.x86_64
 问题 2: conflicting requests
  - nothing provides module(perl:5.26) needed by module perl-DBI:1.641:8010020191113222731:16b3ab4d-0.x86_64
依赖关系解决。
=============================================================================================================
 软件包               架构       版本                                                   仓库            大小
=============================================================================================================
移除:
 podman-manpages      noarch     1.4.2-5.module_el8.1.0+237+63e26edc                    @AppStream     134 k
移除依赖的软件包:
 cockpit-podman       noarch     4-1.module_el8.1.0+237+63e26edc                        @AppStream     5.1 M
清除未被使用的依赖关系:
 libvarlink           x86_64     18-3.el8                                               @anaconda      129 k
 oci-systemd-hook     x86_64     1:0.1.15-2.git2d0b8a3.module_el8.1.0+237+63e26edc      @AppStream      74 k
 podman               x86_64     1.4.2-5.module_el8.1.0+237+63e26edc                    @AppStream      51 M

事务概要
=============================================================================================================
移除  5 软件包

将会释放空间:56 M
确定吗?[y/N]: y
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务
  准备中  :                                                                                              1/1 
  运行脚本: cockpit-podman-4-1.module_el8.1.0+237+63e26edc.noarch                                        1/1 
  删除    : cockpit-podman-4-1.module_el8.1.0+237+63e26edc.noarch                                        1/5 
  删除    : podman-1.4.2-5.module_el8.1.0+237+63e26edc.x86_64                                            2/5 
  运行脚本: podman-1.4.2-5.module_el8.1.0+237+63e26edc.x86_64                                            2/5 
  删除    : podman-manpages-1.4.2-5.module_el8.1.0+237+63e26edc.noarch                                   3/5 
  删除    : oci-systemd-hook-1:0.1.15-2.git2d0b8a3.module_el8.1.0+237+63e26edc.x86_64                    4/5 
  删除    : libvarlink-18-3.el8.x86_64                                                                   5/5 
  运行脚本: libvarlink-18-3.el8.x86_64                                                                   5/5 
  验证    : cockpit-podman-4-1.module_el8.1.0+237+63e26edc.noarch                                        1/5 
  验证    : libvarlink-18-3.el8.x86_64                                                                   2/5 
  验证    : oci-systemd-hook-1:0.1.15-2.git2d0b8a3.module_el8.1.0+237+63e26edc.x86_64                    3/5 
  验证    : podman-1.4.2-5.module_el8.1.0+237+63e26edc.x86_64                                            4/5 
  验证    : podman-manpages-1.4.2-5.module_el8.1.0+237+63e26edc.noarch                                   5/5 

已移除:
  podman-manpages-1.4.2-5.module_el8.1.0+237+63e26edc.noarch                                                 
  cockpit-podman-4-1.module_el8.1.0+237+63e26edc.noarch                                                      
  libvarlink-18-3.el8.x86_64                                                                                 
  oci-systemd-hook-1:0.1.15-2.git2d0b8a3.module_el8.1.0+237+63e26edc.x86_64                                  
  podman-1.4.2-5.module_el8.1.0+237+63e26edc.x86_64                                                          

完毕!

重复执行:

sudo yum install docker-ce docker-ce-cli containerd.io

安装完成。踩坑一晚上,觉得有帮助就点个赞吧。

你可能感兴趣的:(docker,docker,linux,centos)