yum -y install docker-ce-18.06.3.ce-3.el7  安装不上,报错:

[root@k8s01 ~]# yum install --setopt=obsoletes=0 docker-ce-18.06.3.ce                                                                          -3.el7 -y
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
正在解决依赖关系
--> 正在检查事务
---> 软件包 docker-ce.x86_64.0.18.06.3.ce-3.el7 将被 安装
--> 正在处理依赖关系 container-selinux >= 2.9,它被软件包 docker-ce-1                                                                          8.06.3.ce-3.el7.x86_64 需要
--> 解决依赖关系完成
错误:软件包:docker-ce-18.06.3.ce-3.el7.x86_64 (docker-ce-stable)
          需要:container-selinux >= 2.9
 您可以尝试添加 --skip-broken 选项来解决该问题
 您可以尝试执行:rpm -Va --nofiles --nodigest

根据报错的提示,尝试添加 --skip-broken,以及尝试执行rpm -Va --nofiles --nodigest,都无法解决,网上也找了很多方法都不好使。

最终是把本地的yum源禁用掉(我这里直接把后缀名.repo改成了-repo),通过走的网络yum源解决的:

 

我这里使用的阿里云的网络yum源: 

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

之后即可解决。

 

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐