CentoOS 安装Docker 报错解决方法
报错详情:
Error:
Problem: package docker-ce-3:19.03.12-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
(try to add ‘–skip-broken’ to skip uninstallable packages or ‘–nobest’ to use not only best candidate packages)
解决方法
1.更新 yum
yum update
2. 安装环境依赖
yum install -y yum-utils
#设置镜像地址
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
3. 手动安装 containerd.io
yum install -y https://mirrors.aliyun.com/docker-ce/linux/centos/7/x86_64/edge/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
4. 安装Docker
yum install -y docker-ce
安装完成后的效果图
Running transaction
Preparing : 1/1
Installing : docker-ce-cli-1:19.03.12-3.el7.x86_64 1/2
Running scriptlet: docker-ce-cli-1:19.03.12-3.el7.x86_64 1/2
Installing : docker-ce-3:19.03.12-3.el7.x86_64 2/2
Running scriptlet: docker-ce-3:19.03.12-3.el7.x86_64 2/2
Verifying : docker-ce-3:19.03.12-3.el7.x86_64 1/2
Verifying : docker-ce-cli-1:19.03.12-3.el7.x86_64 2/2
Installed products updated.
Installed:
docker-ce-3:19.03.12-3.el7.x86_64 docker-ce-cli-1:19.03.12-3.el7.x86_64
Complete!