Centos7.3 安装 Docker 报错:Requires: container-selinux >= 2:2.74

2021-04-02 09:51:32 浏览数 (1)

安装 Docker 19.03.8:

yum install docker-ce-19.03.8

报错如下:

Error: Package: 3:docker-ce-19.03.8-3.el7.x86_64 (docker-ce-stable)

Requires: container-selinux >= 2:2.74

Error: Package: containerd.io-1.4.4-3.1.el7.x86_64 (docker-ce-stable)

Requires: container-selinux >= 2:2.74

You could try using --skip-broken to work around the problem

You could try running: rpm -Va --nofiles --nodigest

操作系统:

CentOS Linux release 7.3.1611 (Core)

解决方式:

使用下面的命令安装 container-selinux:

yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-3.el7.noarch.rpm

container-selinux 更多版本可以在下面链接查看:

http://mirror.centos.org/centos/7/extras/x86_64/Packages/

参考:

https://stackoverflow.com/questions/45272827/docker-ce-on-rhel-requires-container-selinux-2-9

0 人点赞