What Happened
While installing Docker with yum on CentOS 8.0, an error occurred after running the command, indicating that containerd.io version >= 1.2.2-3 was required.
The command executed was:
1
| sudo yum install docker-ce docker-ce-cli containerd.io
|
Detailed error message:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| Last metadata expiration check: 0:01:32 ago on Sat 26 Sep 2020 12:10:38 AM CST.
Error:
Problem: package docker-ce-3:19.03.13-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 filtered out by modular filtering
- package containerd.io-1.2.13-3.1.el7.x86_64 is filtered out by modular filtering
- package containerd.io-1.2.13-3.2.el7.x86_64 is filtered out by modular filtering
- package containerd.io-1.2.2-3.3.el7.x86_64 is filtered out by modular filtering
- package containerd.io-1.2.2-3.el7.x86_64 is filtered out by modular filtering
- package containerd.io-1.2.4-3.1.el7.x86_64 is filtered out by modular filtering
- package containerd.io-1.2.5-3.1.el7.x86_64 is filtered out by modular filtering
- package containerd.io-1.2.6-3.3.el7.x86_64 is filtered out by modular filtering
- package containerd.io-1.3.7-3.1.el7.x86_64 is filtered out by modular filtering
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
|
Solutions
- Install an older version of Docker
- Manually install a newer version of
containerd.io
For the first method, this article provides a detailed explanation. Here, we will focus on the second method.
Download the RPM package for containerd.io and install the new version of containerd.io
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| ## If your system isn't installed, install it first.
$sudo yum install -y wget
## Centos 7 executes the following orders.
$wget https://download.docker.com/linux/centos/7/x86_64/edge/Packages/containerd.io-1.3.7-3.1.el7.x86_64.rpm
## Cantos 8 carries out the following orders.
$wget https://download.docker.com/linux/centos/8/x86_64/edge/Packages/containerd.io-1.3.7-3.1.el8.x86_64.rpm
## After implementation, there will be a containerd.io-1.3.7-XXX.rpm file under the current directory
## Install with this rpm
$sudo yum install -y containerd.io-1.3.7-3.1.el8.x86_64.rpm
## Docker will be installed after installation
$sudo yum install docker-ce docker-ce-cli containerd.io
|
Verify That Docker Was Installed Successfully
1
2
3
4
5
6
| #Start Docker
$systemctl start docker
#Check the docker version
$docker -v
|