我正在尝试在 Ubuntu 20.04 LTS 上安装 Docker。我正在使用官方文档。我以前做过,没有问题。
这是运行后的错误sudo apt-get update
:
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://packages.microsoft.com/repos/code stable InRelease
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:4 http://ir.archive.ubuntu.com/ubuntu focal InRelease
Hit:5 http://ir.archive.ubuntu.com/ubuntu focal-updates InRelease
Get:6 https://download.docker.com/linux/ubuntu focal InRelease [52.1 kB]
Hit:7 http://ir.archive.ubuntu.com/ubuntu focal-backports InRelease
Err:6 https://download.docker.com/linux/ubuntu focal InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8
Reading package lists... Done
W: GPG error: https://download.docker.com/linux/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8
E: The repository 'https://download.docker.com/linux/ubuntu focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
我看到了如何修复 GPG 错误“NO_PUBKEY”?但我无法解决问题。
您可能需要仔细检查 Docker 文档中的第二步是否已应用于您的系统:
没有这个,你将无法连接到 repo。我刚刚在全新的 Ubuntu 安装上测试了安装步骤,一切正常,没有任何问题。希望这就是你需要做的一切??