Centos
如何在 CentOS 上安裝 docker?
在安裝docker 時遇到一些問題:
[root@rolly ~]# [root@rolly ~]# sudo yum install -y yum-utils Docker CE Stable - x86_64 42 kB/s | 3.5 kB 00:00 Package yum-utils-4.0.12-3.el8.noarch is already installed. Dependencies resolved. Nothing to do. Complete! [root@rolly ~]# [root@rolly ~]# sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo [root@rolly ~]# [root@rolly ~]# sudo yum install docker-ce docker-ce-cli containerd.io Docker CE Stable - x86_64 22 kB/s | 3.5 kB 00:00 Package containerd.io-1.2.0-3.el7.x86_64 is already installed. 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) [root@rolly ~]# [root@rolly ~]# lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 8.2.2004 (Core) Release: 8.2.2004 Codename: Core [root@rolly ~]#
我應該一起去
nobest
嗎?
如果最新版本不可安裝,您可以執行:
dnf install docker-ce --nobest
安裝不是最後一個版本的另一個版本。有點難過,但它有效。