我之前在 Ubuntu 上安装过几次 docker。不知道为什么现在不起作用。现在似乎有一个 eoan 版本。我的输出如下。
joe@hpd:~$ sudo apt-get remove docker docker-engine docker.io containerd runc
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'docker-engine' is not installed, so not removed
Package 'containerd' is not installed, so not removed
Package 'docker' is not installed, so not removed
Package 'docker.io' is not installed, so not removed
Package 'runc' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
joe@hpd:~$ sudo apt-get update
Hit:1 http://prerelease.keybase.io/deb stable InRelease
Hit:2 https://updates.signal.org/desktop/apt xenial InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu eoan InRelease
Hit:4 https://download.docker.com/linux/ubuntu eoan InRelease
Get:5 http://us.archive.ubuntu.com/ubuntu eoan-updates InRelease [97.5 kB]
Hit:6 http://packages.microsoft.com/repos/vscode stable InRelease
Get:7 http://us.archive.ubuntu.com/ubuntu eoan-backports InRelease [88.8 kB]
Get:8 http://security.ubuntu.com/ubuntu eoan-security InRelease [97.5 kB]
Hit:9 https://packages.microsoft.com/repos/azure-cli eoan InRelease
Hit:10 https://packages.microsoft.com/ubuntu/19.04/prod disco InRelease
Hit:11 https://packages.microsoft.com/repos/ms-teams stable InRelease
Fetched 284 kB in 1s (324 kB/s)
Reading package lists... Done
joe@hpd:~$ sudo apt-get install \
> apt-transport-https \
> ca-certificates \
> curl \
> gnupg-agent \
> software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
ca-certificates is already the newest version (20190110).
curl is already the newest version (7.65.3-1ubuntu3).
software-properties-common is already the newest version (0.98.5).
apt-transport-https is already the newest version (1.9.4).
gnupg-agent is already the newest version (2.2.12-1ubuntu3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
jgreenaw@hpd:~$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
OK
joe@hpd:~$ sudo apt-key fingerprint 0EBFCD88
pub rsa4096 2017-02-22 [SCEA]
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid [ unknown] Docker Release (CE deb) <[email protected]>
sub rsa4096 2017-02-22 [S]
joe@hpd:~$ sudo add-apt-repository \
> "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
> $(lsb_release -cs) \
> stable"
Hit:1 http://prerelease.keybase.io/deb stable InRelease
Hit:2 https://download.docker.com/linux/ubuntu eoan InRelease
Hit:3 https://updates.signal.org/desktop/apt xenial InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu eoan InRelease
Get:5 http://us.archive.ubuntu.com/ubuntu eoan-updates InRelease [97.5 kB]
Hit:6 http://packages.microsoft.com/repos/vscode stable InRelease
Get:7 http://us.archive.ubuntu.com/ubuntu eoan-backports InRelease [88.8 kB]
Get:8 http://security.ubuntu.com/ubuntu eoan-security InRelease [97.5 kB]
Hit:9 https://packages.microsoft.com/repos/azure-cli eoan InRelease
Hit:10 https://packages.microsoft.com/ubuntu/19.04/prod disco InRelease
Hit:11 https://packages.microsoft.com/repos/ms-teams stable InRelease
Fetched 284 kB in 1s (330 kB/s)
Reading package lists... Done
jgreenaw@hpd:~$ sudo apt-get update
Hit:1 http://prerelease.keybase.io/deb stable InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu eoan InRelease
Hit:3 https://download.docker.com/linux/ubuntu eoan InRelease
Get:4 http://us.archive.ubuntu.com/ubuntu eoan-updates InRelease [97.5 kB]
Hit:5 https://updates.signal.org/desktop/apt xenial InRelease
Get:6 http://us.archive.ubuntu.com/ubuntu eoan-backports InRelease [88.8 kB]
Hit:7 http://packages.microsoft.com/repos/vscode stable InRelease
Get:8 http://security.ubuntu.com/ubuntu eoan-security InRelease [97.5 kB]
Hit:9 https://packages.microsoft.com/repos/azure-cli eoan InRelease
Hit:10 https://packages.microsoft.com/ubuntu/19.04/prod disco InRelease
Hit:11 https://packages.microsoft.com/repos/ms-teams stable InRelease
Fetched 284 kB in 1s (375 kB/s)
Reading package lists... Done
joe@hpd:~$ 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'
答案1
首先,在官方文档eoan
,目前还没有提到dist。其次,根据我的调查,
没有可供分发的稳定版本的 docker (eoan
分发存储库)。
因此,您可以尝试以下操作:
- 使用以下命令设置稳定存储库。要添加 nightly 或 test 存储库,请在以下命令中的 stable 一词后添加 nightly 或 test (或两者)。了解 nightly 和 test 频道。
因此,使用nightly
渠道而不是stable
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable nightly"
祝你好运!