centos7安装docker报错

错误提示:

Error: Package: selinux-policy-targeted-3.13.1-252.el7_7.6.noarch (updates)
Requires: policycoreutils >= 2.5-24
Installed: policycoreutils-2.5-11.el7_3.x86_64 (@updates)
policycoreutils = 2.5-11.el7_3
Available: policycoreutils-2.5-22.el7.x86_64 (base)
policycoreutils = 2.5-22.el7
Error: Package: selinux-policy-3.13.1-252.el7_7.6.noarch (updates)
Requires: policycoreutils >= 2.5-24
Installed: policycoreutils-2.5-11.el7_3.x86_64 (@updates)
policycoreutils = 2.5-11.el7_3
Available: policycoreutils-2.5-22.el7.x86_64 (base)
policycoreutils = 2.5-22.el7
Error: Package: selinux-policy-3.13.1-252.el7_7.6.noarch (updates)
Requires: libsemanage >= 2.5-13
Installed: libsemanage-2.5-5.1.el7_3.x86_64 (@updates)
libsemanage = 2.5-5.1.el7_3
Available: libsemanage-2.5-11.el7.i686 (base)
libsemanage = 2.5-11.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

===========================================================================

最后解决:yum clean all

yum install docker-ce

# 1、下载rpm源文件 * rpm下载不了的文件可以到[rpm官方](http://rpm.pbone.net/)进行下载 # 2、执行rpm文件 * 1、以下的rpm文件是有依赖,需要安装顺序进行执行. * 2、执行policycoreutils-python-2.5-29.el7.x86_64.rpm发现报 错误:依赖检测失败: policycoreutils = 2.5-22.el7 被 policycoreutils-python-2.5-22.el7.x86_64 需要 去rpm官方网找了一个`policycoreutils-python-2.5-29.el7_6.1.x86_64.rpm`最新的安装包执行安装 * 3、python-kitchen-1.1.1-5.el7.noarch.rpm可以不需要安装 ``` rpm -ivh libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm rpm -ivh audit-libs-python-2.8.4-4.el7.x86_64.rpm rpm -ivh libcgroup-0.41-20.el7.x86_64.rpm rpm -ivh libsemanage-python-2.5-14.el7.x86_64.rpm rpm -ivh checkpolicy-2.5-8.el7.x86_64.rpm rpm -ivh python-IPy-0.75-6.el7.noarch.rpm rpm -ivh setools-libs-3.3.8-4.el7.x86_64.rpm rpm -ivh policycoreutils-python-2.5-29.el7_6.1.x86_64.rpm rpm -ivh container-selinux-2.74-1.el7.noarch.rpm rpm -ivh libseccomp-2.3.1-3.el7.x86_64.rpm rpm -ivh containerd.io-1.2.0-3.el7.x86_64.rpm rpm -ivh docker-ce-cli-18.09.0-3.el7.x86_64.rpm rpm -ivh docker-ce-18.09.0-3.el7.x86_64.rpm ``` # 3、启动docker ``` systemctl daemon-reload && systemctl restart docker ``` # 4、设置开机启动 * Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service. ``` systemctl enable docker.service ``` # 5、验证docker ``` docker version ``` # 参考文章 * [CentOS 7.5离线安装Docker 18.09.3软件](https://jingyan.baidu.com/article/fb48e8becf31a16e632e145f.html)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值