Moby: Unable to install docker docker-ce-17.03.1.ce-1.el7.centos

13

Description

I'm unable to install Docker CE version 17.03.1.ce-1.el7.centos (or 17.03.2.ce-1.el7.centos), on a fresh installation of Centos 7.3

Steps to reproduce the issue:

  1. sudo yum-config-manager -y --add-repo https://download.docker.com/linux/centos/docker-ce.repo
  2. sudo yum install -y docker-ce-17.03.1.ce-1.el7.centos

Describe the results you received:

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 0:17.03.1.ce-1.el7.centos will be installed
--> Processing Dependency: docker-ce-selinux >= 17.03.1.ce-1.el7.centos for package: docker-ce-17.03.1.ce-1.el7.centos.x86_64
Package docker-ce-selinux is obsoleted by docker-ce, but obsoleting package does not provide for requirements
--> Processing Dependency: libcgroup for package: docker-ce-17.03.1.ce-1.el7.centos.x86_64
--> Processing Dependency: libseccomp.so.2()(64bit) for package: docker-ce-17.03.1.ce-1.el7.centos.x86_64
--> Processing Dependency: libltdl.so.7()(64bit) for package: docker-ce-17.03.1.ce-1.el7.centos.x86_64
--> Running transaction check
---> Package docker-ce.x86_64 0:17.03.1.ce-1.el7.centos will be installed
--> Processing Dependency: docker-ce-selinux >= 17.03.1.ce-1.el7.centos for package: docker-ce-17.03.1.ce-1.el7.centos.x86_64
Package docker-ce-selinux is obsoleted by docker-ce, but obsoleting package does not provide for requirements
---> Package libcgroup.x86_64 0:0.41-11.el7 will be installed
---> Package libseccomp.x86_64 0:2.3.1-2.el7 will be installed
---> Package libtool-ltdl.x86_64 0:2.4.2-22.el7_3 will be installed
--> Finished Dependency Resolution
Error: Package: docker-ce-17.03.1.ce-1.el7.centos.x86_64 (docker-ce-stable)
           Requires: docker-ce-selinux >= 17.03.1.ce-1.el7.centos
           Available: docker-ce-selinux-17.03.0.ce-1.el7.centos.noarch (docker-ce-stable)
               docker-ce-selinux = 17.03.0.ce-1.el7.centos
           Available: docker-ce-selinux-17.03.1.ce-1.el7.centos.noarch (docker-ce-stable)
               docker-ce-selinux = 17.03.1.ce-1.el7.centos
           Available: docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch (docker-ce-stable)
               docker-ce-selinux = 17.03.2.ce-1.el7.centos
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Describe the results you expected:

For Docker to be installed

Additional environment details (AWS, VirtualBox, physical, etc.):

Azure, Centos 7.3 OpenLogic image

Running either of the following also failed in a similar way:

sudo yum install -y docker-ce-17.03.1.ce-1.el7.centos docker-ce-selinux.17.03.1.ce-1.el7.centos
sudo yum install -y docker-ce-17.03.2.ce-1.el7.centos docker-ce-selinux.17.03.2.ce-1.el7.centos

But running the following does work, but tries to install version 17.06.0.ce-1.el7.centos:

sudo yum install  docker-ce
the-nw1-group picture the-nw1-group  ·  3 Jul 2017

Most helpful comment

227

A new obsoletes restriction was introduced in docker-ce 17.06.0 and it looks like the yum repo is applying it to all versions of the docker-ce indiscriminately. To work around this when installing older versions of docker-ce, you can pass a flag to ignore obsoletes:

$ yum install -y --setopt=obsoletes=0 \
  docker-ce-17.03.1.ce-1.el7.centos \
  docker-ce-selinux-17.03.1.ce-1.el7.centos

Related to issue: https://github.com/docker/for-linux/issues/20#issuecomment-312122325

andrewhsu picture andrewhsu  ·  4 Jul 2017

All comments

-42

You must install both packages at the same time: yum install docker-ce-17.03.1.ce-1.el7.centos docker-ce-selinux-17.03.1.ce-1.el7.centos

cpuguy83 picture cpuguy83  ·  3 Jul 2017
0

@cpuguy83 nope, just got here from running into the same issue myself.

$ sudo yum install docker-ce-17.03.1.ce-1.el7.centos docker-ce-selinux-17.03.1.ce-1.el7.centos
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: centos.mirror.digitalpacific.com.au
  • epel: epel.mirror.digitalpacific.com.au
  • extras: centos.mirror.digitalpacific.com.au
  • updates: mirror.nsw.coloau.com.au
    Package docker-ce-selinux is obsoleted by docker-ce, trying to install docker-ce-17.06.0.ce-1.el7.centos.x86_64 instead
    Resolving Dependencies
    --> Running transaction check
    ---> Package docker-ce.x86_64 0:17.03.1.ce-1.el7.centos will be installed
    --> Processing Dependency: docker-ce-selinux >= 17.03.1.ce-1.el7.centos for package: docker-ce-17.03.1.ce-1.el7.centos.x86_64
    Package docker-ce-selinux is obsoleted by docker-ce, but obsoleting package does not provide for requirements
    ---> Package docker-ce.x86_64 0:17.06.0.ce-1.el7.centos will be installed
    --> Processing Dependency: container-selinux >= 2.9 for package: docker-ce-17.06.0.ce-1.el7.centos.x86_64
    --> Running transaction check
    ---> Package container-selinux.noarch 2:2.19-2.1.el7 will be installed
    ---> Package docker-ce.x86_64 0:17.03.1.ce-1.el7.centos will be installed
    --> Processing Dependency: docker-ce-selinux >= 17.03.1.ce-1.el7.centos for package: docker-ce-17.03.1.ce-1.el7.centos.x86_64
    Package docker-ce-selinux is obsoleted by docker-ce, but obsoleting package does not provide for requirements
    --> Finished Dependency Resolution
    Error: Package: docker-ce-17.03.1.ce-1.el7.centos.x86_64 (docker-ce-stable)
    Requires: docker-ce-selinux >= 17.03.1.ce-1.el7.centos
    Available: docker-ce-selinux-17.03.0.ce-1.el7.centos.noarch (docker-ce-stable)
    docker-ce-selinux = 17.03.0.ce-1.el7.centos
    Available: docker-ce-selinux-17.03.1.ce-1.el7.centos.noarch (docker-ce-stable)
    docker-ce-selinux = 17.03.1.ce-1.el7.centos
    Available: docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch (docker-ce-stable)
    docker-ce-selinux = 17.03.2.ce-1.el7.centos
    You could try using --skip-broken to work around the problem
    You could try running: rpm -Va --nofiles --nodigest
ghost picture ghost  ·  3 Jul 2017
227

A new obsoletes restriction was introduced in docker-ce 17.06.0 and it looks like the yum repo is applying it to all versions of the docker-ce indiscriminately. To work around this when installing older versions of docker-ce, you can pass a flag to ignore obsoletes:

$ yum install -y --setopt=obsoletes=0 \
  docker-ce-17.03.1.ce-1.el7.centos \
  docker-ce-selinux-17.03.1.ce-1.el7.centos

Related to issue: https://github.com/docker/for-linux/issues/20#issuecomment-312122325

andrewhsu picture andrewhsu  ·  4 Jul 2017
0

Thanks @andrewhsu that worked a treat.

the-nw1-group picture the-nw1-group  ·  4 Jul 2017
2

thanks @andrewhsu it worked as below
$ yum install -y --setopt=obsoletes=0
docker-ce-17.03.0.ce-1.el7.centos
docker-ce-selinux-17.03.0.ce-1.el7.centos

shekarvt picture shekarvt  ·  12 Aug 2017
0

Thanks @andrewhsu ...!

vmbaraiya picture vmbaraiya  ·  18 Sep 2017
-1

It did not work from me. Here the work around I used.

I used following command to manual install by by specifying the .rpm Link

yum install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm

That's it. It installed docker on my CentOS 7.

Here is the link to available docker RPM and stable packages
https://download.docker.com/linux/centos/7/x86_64/stable/Packages/

tvprasad picture tvprasad  ·  6 Jan 2018
-11

As of today I guess Docker already fixed issue of multiple repo call using same URL
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce
systemctl enable docker && systemctl start docker

I have used it and its working fine

SaadUSheikh picture SaadUSheikh  ·  17 Aug 2018
0

sudo yum remove docker
docker-client
docker-client-latest
docker-common
docker-latest
docker-latest-logrotate
docker-logrotate
docker-engine
Use this to remove old version then this
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce
systemctl enable docker && systemctl start docker
upgraded to latest version

Akanksha1709 picture Akanksha1709  ·  30 Mar 2020
2

A new obsoletes restriction was introduced in docker-ce 17.06.0 and it looks like the yum repo is applying it to all versions of the docker-ce indiscriminately. To work around this when installing older versions of docker-ce, you can pass a flag to ignore obsoletes:

$ yum install -y --setopt=obsoletes=0 \
  docker-ce-17.03.1.ce-1.el7.centos \
  docker-ce-selinux-17.03.1.ce-1.el7.centos

Related to issue: docker/for-linux#20 (comment)

sudo yum install -y --setopt=obsoletes=0
docker-ce-17.03.1.ce-1.el7.centos
docker-ce-selinux-17.03.1.ce-1.el7.centos

Really works ^^

kingdavid72 picture kingdavid72  ·  1 May 2020
0

me too

bbhxwl picture bbhxwl  ·  20 Sep 2020