I am not able to install the docker on the CentOS Linux release 7.3.1611 (Core)
1.Have enable the extras in the /etc/yum.repos.d/CentOS-Base.repo
from enabled=0 to enabled=1
Also uncommented the #baseurl=http://mirror.centos.org/$releasever/extras/$basearch/
2.After that i tried to run the command “yum -y install docker”
I am getting below errors.
Error: Package: 2:container-selinux-2.107-1.el7_6.noarch (extras)
Requires: selinux-policy-base >= 3.13.1-216.el7
Installed: selinux-policy-targeted-3.13.1-102.el7.noarch (@anaconda)
selinux-policy-base = 3.13.1-102.el7
Available: selinux-policy-minimum-3.13.1-192.el7.noarch (CentOS-7-x86_64-os)
selinux-policy-base = 3.13.1-192.el7
Available: selinux-policy-minimum-3.13.1-192.el7_5.3.noarch (CentOS-7-x86_64-updates)
selinux-policy-base = 3.13.1-192.el7_5.3
Available: selinux-policy-minimum-3.13.1-192.el7_5.4.noarch (CentOS-7-x86_64-updates)
selinux-policy-base = 3.13.1-192.el7_5.4
Available: selinux-policy-minimum-3.13.1-192.el7_5.6.noarch (CentOS-7-x86_64-updates)
selinux-policy-base = 3.13.1-192.el7_5.6
Available: selinux-policy-mls-3.13.1-192.el7.noarch (CentOS-7-x86_64-os)
selinux-policy-base = 3.13.1-192.el7
Available: selinux-policy-mls-3.13.1-192.el7_5.3.noarch (CentOS-7-x86_64-updates)
selinux-policy-base = 3.13.1-192.el7_5.3
Available: selinux-policy-mls-3.13.1-192.el7_5.4.noarch (CentOS-7-x86_64-updates)
selinux-policy-base = 3.13.1-192.el7_5.4
Available: selinux-policy-mls-3.13.1-192.el7_5.6.noarch (CentOS-7-x86_64-updates)
selinux-policy-base = 3.13.1-192.el7_5.6
Available: selinux-policy-targeted-3.13.1-192.el7.noarch (CentOS-7-x86_64-os)
selinux-policy-base = 3.13.1-192.el7
Available: selinux-policy-targeted-3.13.1-192.el7_5.3.noarch (CentOS-7-x86_64-updates)
selinux-policy-base = 3.13.1-192.el7_5.3
Available: selinux-policy-targeted-3.13.1-192.el7_5.4.noarch (CentOS-7-x86_64-updates)
selinux-policy-base = 3.13.1-192.el7_5.4
Available: selinux-policy-targeted-3.13.1-192.el7_5.6.noarch (CentOS-7-x86_64-updates)
selinux-policy-base = 3.13.1-192.el7_5.6
Error: Package: 2:container-selinux-2.107-1.el7_6.noarch (extras)
Requires: selinux-policy >= 3.13.1-216.el7
Installed: selinux-policy-3.13.1-102.el7.noarch (@anaconda)
selinux-policy = 3.13.1-102.el7
Available: selinux-policy-3.13.1-192.el7.noarch (CentOS-7-x86_64-os)
selinux-policy = 3.13.1-192.el7
Available: selinux-policy-3.13.1-192.el7_5.3.noarch (CentOS-7-x86_64-updates)
selinux-policy = 3.13.1-192.el7_5.3
Available: selinux-policy-3.13.1-192.el7_5.4.noarch (CentOS-7-x86_64-updates)
selinux-policy = 3.13.1-192.el7_5.4
Available: selinux-policy-3.13.1-192.el7_5.6.noarch (CentOS-7-x86_64-updates)
selinux-policy = 3.13.1-192.el7_5.6
Error: Package: 2:container-selinux-2.107-1.el7_6.noarch (extras)
Requires: selinux-policy-targeted >= 3.13.1-216.el7
Installed: selinux-policy-targeted-3.13.1-102.el7.noarch (@anaconda)
selinux-policy-targeted = 3.13.1-102.el7
Available: selinux-policy-targeted-3.13.1-192.el7.noarch (CentOS-7-x86_64-os)
selinux-policy-targeted = 3.13.1-192.el7
Available: selinux-policy-targeted-3.13.1-192.el7_5.3.noarch (CentOS-7-x86_64-updates)
selinux-policy-targeted = 3.13.1-192.el7_5.3
Available: selinux-policy-targeted-3.13.1-192.el7_5.4.noarch (CentOS-7-x86_64-updates)
selinux-policy-targeted = 3.13.1-192.el7_5.4
Available: selinux-policy-targeted-3.13.1-192.el7_5.6.noarch (CentOS-7-x86_64-updates)
selinux-policy-targeted = 3.13.1-192.el7_5.6
You could try using –skip-broken to work around the problem
You could try running: rpm -Va –nofiles –nodigest
3
Answers
What is the output of
yum repolist -v
? can you try to Install selinux-policy rpm package:# yum install selinux-policy
It’s possible to show Status of SELinux (Security-Enhanced Linux) like follows. (enabled by default) run thisgetenforce
we shall take it from thereInstall Docker Centos7
run
restart shell and run
If you are installing docker for centos on an aws machine this link is a day saver: https://www.reddit.com/r/aws/comments/f99mq1/its_impossible_to_install_docker_engine_on_aws/
Just make sure that you deleted the repo file before issuing the mentioned commands: /etc/yum.repos.d/docker-ce.repo