Back To Basics

Installation of docker fails on CentOS 8 with Error – package containerd.io-1.2.10-3.2.el7.x86_64 is excluded

I recently came across a strange issue while installing Docker on CentOS (version 8) machine.

Issue

When I tried below options to install docker on my machine I got the same error every time.

Installation Commands Used

yum install -y -q docker-ce
or
yum install -y docker-ce.x86_64
or
yum install docker-ce

Error message received

Error:
 Problem: package docker-ce-3:19.03.8-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed
  - cannot install the best candidate for the job
  - package containerd.io-1.2.10-3.2.el7.x86_64 is excluded
  - package containerd.io-1.2.13-3.1.el7.x86_64 is excluded
  - package containerd.io-1.2.2-3.3.el7.x86_64 is excluded
  - package containerd.io-1.2.2-3.el7.x86_64 is excluded
  - package containerd.io-1.2.4-3.1.el7.x86_64 is excluded
  - package containerd.io-1.2.5-3.1.el7.x86_64 is excluded
  - package containerd.io-1.2.6-3.3.el7.x86_64 is excluded

Resolution

To resolve this issue, first we need to manually install the containerd.io package.

[root@test_centos8 /]# yum install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
Last metadata expiration check: 0:02:53 ago on Thu 02 Apr 2020 09:29:41 AM UTC.
containerd.io-1.2.6-3.3.el7.x86_64.rpm                                                                                                                                 18 MB/s |  26 MB     00:01
Dependencies resolved.
======================================================================================================================================================================================================
 Package                                               Architecture                    Version                                                            Repository                             Size
======================================================================================================================================================================================================
Installing:
 containerd.io                                         x86_64                          1.2.6-3.3.el7                                                      @commandline                           26 M
Installing dependencies:
 container-selinux                                     noarch                          2:2.124.0-1.module_el8.1.0+272+3e64ee36                            AppStream                              47 k
 checkpolicy                                           x86_64                          2.9-1.el8                                                          BaseOS                                348 k
 libselinux-utils                                      x86_64                          2.9-2.1.el8                                                        BaseOS                                243 k
 policycoreutils                                       x86_64                          2.9-3.el8_1.1                                                      BaseOS                                377 k
 policycoreutils-python-utils                          noarch                          2.9-3.el8_1.1                                                      BaseOS                                250 k
 python3-audit                                         x86_64                          3.0-0.13.20190507gitf58ec40.el8                                    BaseOS                                 85 k
 python3-libselinux                                    x86_64                          2.9-2.1.el8                                                        BaseOS                                283 k
 python3-libsemanage                                   x86_64                          2.9-1.el8                                                          BaseOS                                127 k
 python3-policycoreutils                               noarch                          2.9-3.el8_1.1                                                      BaseOS                                2.2 M
 python3-setools                                       x86_64                          4.2.2-1.el8                                                        BaseOS                                600 k
 rpm-plugin-selinux                                    x86_64                          4.14.2-25.el8                                                      BaseOS                                 73 k
 selinux-policy                                        noarch                          3.14.3-20.el8                                                      BaseOS                                602 k
 selinux-policy-targeted                               noarch                          3.14.3-20.el8                                                      BaseOS                                 15 M
Enabling module streams:
 container-tools                                                                       rhel8

Transaction Summary
======================================================================================================================================================================================================
Install  14 Packages

Total size: 46 M
Total download size: 20 M
Installed size: 158 M
Downloading Packages:
(1/13): libselinux-utils-2.9-2.1.el8.x86_64.rpm                                                                                                                       2.4 MB/s | 243 kB     00:00
(2/13): container-selinux-2.124.0-1.module_el8.1.0+272+3e64ee36.noarch.rpm                                                                                            375 kB/s |  47 kB     00:00
(3/13): checkpolicy-2.9-1.el8.x86_64.rpm                                                                                                                              2.5 MB/s | 348 kB     00:00
(4/13): python3-audit-3.0-0.13.20190507gitf58ec40.el8.x86_64.rpm                                                                                                      2.5 MB/s |  85 kB     00:00
(5/13): policycoreutils-2.9-3.el8_1.1.x86_64.rpm                                                                                                                      3.0 MB/s | 377 kB     00:00
(6/13): python3-libsemanage-2.9-1.el8.x86_64.rpm                                                                                                                      2.2 MB/s | 127 kB     00:00
(7/13): policycoreutils-python-utils-2.9-3.el8_1.1.noarch.rpm                                                                                                         685 kB/s | 250 kB     00:00
(8/13): python3-libselinux-2.9-2.1.el8.x86_64.rpm                                                                                                                     810 kB/s | 283 kB     00:00
(9/13): rpm-plugin-selinux-4.14.2-25.el8.x86_64.rpm                                                                                                                   288 kB/s |  73 kB     00:00
(10/13): python3-setools-4.2.2-1.el8.x86_64.rpm                                                                                                                       1.1 MB/s | 600 kB     00:00
(11/13): selinux-policy-3.14.3-20.el8.noarch.rpm                                                                                                                      936 kB/s | 602 kB     00:00
(12/13): python3-policycoreutils-2.9-3.el8_1.1.noarch.rpm                                                                                                             1.3 MB/s | 2.2 MB     00:01
(13/13): selinux-policy-targeted-3.14.3-20.el8.noarch.rpm                                                                                                             3.0 MB/s |  15 MB     00:05
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                 2.8 MB/s |  20 MB     00:07
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                              1/1
  Installing       : python3-libselinux-2.9-2.1.el8.x86_64                                                                                                                                       1/14
  Installing       : libselinux-utils-2.9-2.1.el8.x86_64                                                                                                                                         2/14
  Installing       : policycoreutils-2.9-3.el8_1.1.x86_64                                                                                                                                        3/14
  Running scriptlet: policycoreutils-2.9-3.el8_1.1.x86_64                                                                                                                                        3/14
  Installing       : rpm-plugin-selinux-4.14.2-25.el8.x86_64                                                                                                                                     4/14
  Installing       : selinux-policy-3.14.3-20.el8.noarch                                                                                                                                         5/14
  Running scriptlet: selinux-policy-3.14.3-20.el8.noarch                                                                                                                                         5/14
  Running scriptlet: selinux-policy-targeted-3.14.3-20.el8.noarch                                                                                                                                6/14
  Installing       : selinux-policy-targeted-3.14.3-20.el8.noarch                                                                                                                                6/14
  Running scriptlet: selinux-policy-targeted-3.14.3-20.el8.noarch                                                                                                                                6/14
  Installing       : python3-libsemanage-2.9-1.el8.x86_64                                                                                                                                        7/14
  Installing       : python3-setools-4.2.2-1.el8.x86_64                                                                                                                                          8/14
  Installing       : python3-audit-3.0-0.13.20190507gitf58ec40.el8.x86_64                                                                                                                        9/14
  Installing       : checkpolicy-2.9-1.el8.x86_64                                                                                                                                               10/14
  Installing       : python3-policycoreutils-2.9-3.el8_1.1.noarch                                                                                                                               11/14
  Installing       : policycoreutils-python-utils-2.9-3.el8_1.1.noarch                                                                                                                          12/14
  Running scriptlet: container-selinux-2:2.124.0-1.module_el8.1.0+272+3e64ee36.noarch                                                                                                           13/14
  Installing       : container-selinux-2:2.124.0-1.module_el8.1.0+272+3e64ee36.noarch                                                                                                           13/14
  Running scriptlet: container-selinux-2:2.124.0-1.module_el8.1.0+272+3e64ee36.noarch                                                                                                           13/14
  Installing       : containerd.io-1.2.6-3.3.el7.x86_64                                                                                                                                         14/14
  Running scriptlet: containerd.io-1.2.6-3.3.el7.x86_64                                                                                                                                         14/14
  Running scriptlet: container-selinux-2:2.124.0-1.module_el8.1.0+272+3e64ee36.noarch                                                                                                           14/14
  Running scriptlet: containerd.io-1.2.6-3.3.el7.x86_64                                                                                                                                         14/14
  Verifying        : container-selinux-2:2.124.0-1.module_el8.1.0+272+3e64ee36.noarch                                                                                                            1/14
  Verifying        : checkpolicy-2.9-1.el8.x86_64                                                                                                                                                2/14
  Verifying        : libselinux-utils-2.9-2.1.el8.x86_64                                                                                                                                         3/14
  Verifying        : policycoreutils-2.9-3.el8_1.1.x86_64                                                                                                                                        4/14
  Verifying        : policycoreutils-python-utils-2.9-3.el8_1.1.noarch                                                                                                                           5/14
  Verifying        : python3-audit-3.0-0.13.20190507gitf58ec40.el8.x86_64                                                                                                                        6/14
  Verifying        : python3-libselinux-2.9-2.1.el8.x86_64                                                                                                                                       7/14
  Verifying        : python3-libsemanage-2.9-1.el8.x86_64                                                                                                                                        8/14
  Verifying        : python3-policycoreutils-2.9-3.el8_1.1.noarch                                                                                                                                9/14
  Verifying        : python3-setools-4.2.2-1.el8.x86_64                                                                                                                                         10/14
  Verifying        : rpm-plugin-selinux-4.14.2-25.el8.x86_64                                                                                                                                    11/14
  Verifying        : selinux-policy-3.14.3-20.el8.noarch                                                                                                                                        12/14
  Verifying        : selinux-policy-targeted-3.14.3-20.el8.noarch                                                                                                                               13/14
  Verifying        : containerd.io-1.2.6-3.3.el7.x86_64                                                                                                                                         14/14

Installed:
  containerd.io-1.2.6-3.3.el7.x86_64   container-selinux-2:2.124.0-1.module_el8.1.0+272+3e64ee36.noarch checkpolicy-2.9-1.el8.x86_64                         libselinux-utils-2.9-2.1.el8.x86_64
  policycoreutils-2.9-3.el8_1.1.x86_64 policycoreutils-python-utils-2.9-3.el8_1.1.noarch                python3-audit-3.0-0.13.20190507gitf58ec40.el8.x86_64 python3-libselinux-2.9-2.1.el8.x86_64
  python3-libsemanage-2.9-1.el8.x86_64 python3-policycoreutils-2.9-3.el8_1.1.noarch                     python3-setools-4.2.2-1.el8.x86_64                   rpm-plugin-selinux-4.14.2-25.el8.x86_64
  selinux-policy-3.14.3-20.el8.noarch  selinux-policy-targeted-3.14.3-20.el8.noarch

Complete!

Once containerd.io package is installed you can go ahead and install the docker without any error.

[root@test_centos8 /]# yum install docker-ce
Last metadata expiration check: 0:19:09 ago on Thu 02 Apr 2020 09:29:41 AM UTC.
Dependencies resolved.
======================================================================================================================================================================================================
 Package                                                Architecture                           Version                                         Repository                                        Size
======================================================================================================================================================================================================
Installing:
 docker-ce                                              x86_64                                 3:19.03.8-3.el7                                 docker-ce-stable                                  25 M
Installing dependencies:
 iptables                                               x86_64                                 1.8.2-16.el8                                    BaseOS                                           586 k
 libcgroup                                              x86_64                                 0.41-19.el8                                     BaseOS                                            70 k
 libnetfilter_conntrack                                 x86_64                                 1.0.6-5.el8                                     BaseOS                                            65 k
 libnfnetlink                                           x86_64                                 1.0.1-13.el8                                    BaseOS                                            33 k
 libnftnl                                               x86_64                                 1.1.1-4.el8                                     BaseOS                                            83 k
 docker-ce-cli                                          x86_64                                 1:19.03.8-3.el7                                 docker-ce-stable                                  40 M

Transaction Summary
======================================================================================================================================================================================================
Install  7 Packages

Total download size: 65 M
Installed size: 276 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): libnetfilter_conntrack-1.0.6-5.el8.x86_64.rpm                                                                                                                  1.0 MB/s |  65 kB     00:00
(2/7): libcgroup-0.41-19.el8.x86_64.rpm                                                                                                                               1.0 MB/s |  70 kB     00:00
(3/7): libnfnetlink-1.0.1-13.el8.x86_64.rpm                                                                                                                           1.0 MB/s |  33 kB     00:00
(4/7): libnftnl-1.1.1-4.el8.x86_64.rpm                                                                                                                                2.3 MB/s |  83 kB     00:00
(5/7): iptables-1.8.2-16.el8.x86_64.rpm                                                                                                                               3.3 MB/s | 586 kB     00:00
(6/7): docker-ce-19.03.8-3.el7.x86_64.rpm                                                                                                                             8.2 MB/s |  25 MB     00:02
(7/7): docker-ce-cli-19.03.8-3.el7.x86_64.rpm                                                                                                                          10 MB/s |  40 MB     00:03
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                  14 MB/s |  65 MB     00:04
warning: /var/cache/dnf/docker-ce-stable-091d8a9c23201250/packages/docker-ce-19.03.8-3.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Docker CE Stable - x86_64                                                                                                                                              39 kB/s | 1.6 kB     00:00
Importing GPG key 0x621E9F35:
 Userid     : "Docker Release (CE rpm) <docker@docker.com>"
 Fingerprint: 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35
 From       : https://download.docker.com/linux/centos/gpg
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                              1/1
  Installing       : libnfnetlink-1.0.1-13.el8.x86_64                                                                                                                                             1/7
  Running scriptlet: libnfnetlink-1.0.1-13.el8.x86_64                                                                                                                                             1/7
  Installing       : libnetfilter_conntrack-1.0.6-5.el8.x86_64                                                                                                                                    2/7
  Running scriptlet: libnetfilter_conntrack-1.0.6-5.el8.x86_64                                                                                                                                    2/7
  Installing       : docker-ce-cli-1:19.03.8-3.el7.x86_64                                                                                                                                         3/7
  Running scriptlet: docker-ce-cli-1:19.03.8-3.el7.x86_64                                                                                                                                         3/7
  Installing       : libnftnl-1.1.1-4.el8.x86_64                                                                                                                                                  4/7
  Running scriptlet: libnftnl-1.1.1-4.el8.x86_64                                                                                                                                                  4/7
  Running scriptlet: iptables-1.8.2-16.el8.x86_64                                                                                                                                                 5/7
  Installing       : iptables-1.8.2-16.el8.x86_64                                                                                                                                                 5/7
  Running scriptlet: iptables-1.8.2-16.el8.x86_64                                                                                                                                                 5/7
  Running scriptlet: libcgroup-0.41-19.el8.x86_64                                                                                                                                                 6/7
  Installing       : libcgroup-0.41-19.el8.x86_64                                                                                                                                                 6/7
  Running scriptlet: libcgroup-0.41-19.el8.x86_64                                                                                                                                                 6/7
  Installing       : docker-ce-3:19.03.8-3.el7.x86_64                                                                                                                                             7/7
  Running scriptlet: docker-ce-3:19.03.8-3.el7.x86_64                                                                                                                                             7/7
  Verifying        : iptables-1.8.2-16.el8.x86_64                                                                                                                                                 1/7
  Verifying        : libcgroup-0.41-19.el8.x86_64                                                                                                                                                 2/7
  Verifying        : libnetfilter_conntrack-1.0.6-5.el8.x86_64                                                                                                                                    3/7
  Verifying        : libnfnetlink-1.0.1-13.el8.x86_64                                                                                                                                             4/7
  Verifying        : libnftnl-1.1.1-4.el8.x86_64                                                                                                                                                  5/7
  Verifying        : docker-ce-3:19.03.8-3.el7.x86_64                                                                                                                                             6/7
  Verifying        : docker-ce-cli-1:19.03.8-3.el7.x86_64                                                                                                                                         7/7

Installed:
  docker-ce-3:19.03.8-3.el7.x86_64     iptables-1.8.2-16.el8.x86_64             libcgroup-0.41-19.el8.x86_64     libnetfilter_conntrack-1.0.6-5.el8.x86_64     libnfnetlink-1.0.1-13.el8.x86_64
  libnftnl-1.1.1-4.el8.x86_64          docker-ce-cli-1:19.03.8-3.el7.x86_64

Complete!

Once docker is successfully installed you can run docker -v to check the installed version.

[root@test_centos8 /]# docker -v
Docker version 19.03.8, build afacb8b

Hope this helps everyone (and saves productive time).

17 replies »

  1. The solution of downloading containerd.io from CentOS 7 first works but one why is the download from centos/7 rather than centos/8? Won’t this invite issues down the line?

    Like

    • I think there’s some problem with package dependency and hence it’s trying to download one of the package for V7 which isn’t supported by CentOS8.

      Like

  2. Thank you for sharing. Fixed the issue in no time. Small note: I used the version containerd.io-1.2.13-3.1.el7.x86_64 which is the newest, but is sorted lexicograpgically “wrong”…

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s