skip to Main Content

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


  1. 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 this getenforce we shall take it from there

    Login or Signup to reply.
  2. Install Docker Centos7

    run

    curl -fsSL https://get.docker.com/ | sh
    sudo systemctl start docker
    sudo systemctl status docker
    sudo systemctl enable docker
    sudo usermod -aG docker $USER
    

    restart shell and run

    docker info
    
    Login or Signup to reply.
  3. 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/

    sudo yum update -y
    sudo amazon-linux-extras install docker
    sudo
    service docker start

    Just make sure that you deleted the repo file before issuing the mentioned commands: /etc/yum.repos.d/docker-ce.repo

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search