我试着按照官方文档来做。但是,当我运行sudo apt-get install docker-ce docker-ce-cli containerd.io
命令时
我收到以下消息:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package docker-ce is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'docker-ce' has no installation candidate
E: Unable to locate package docker-ce-cli
E: Unable to locate package containerd.io
E: Couldn't find any package by glob 'containerd.io'
E: Couldn't find any package by regex 'containerd.io'
此外,当运行apt-cache madison docker-ce
时,终端中没有显示任何内容...
3条答案
按热度按时间7ivaypg91#
1.更新防止酷刑措施:
2.首先安装以下软件包:
3.添加GPG密钥:
4.然后添加Docker存储库:
5.再次更新:
6.安装docker-ce、cli和containerd.io:
必须工作-确保以root用户身份或使用sudo执行所有命令。
您还可以使用他们的脚本来自动执行所有操作:
b09cbbtk2#
use
curl https://get.docker.com/ | bash -
这是一个自动化脚本,在大多数情况下都可以使用ppcbkaq53#
安装
docker
非常简单: