MySQL:签名验证期间发生错误

Man*_*dan 12 mysql package-management apt repository 20.04

通过 VirtualBox,即使在不同的机器上,我也有 2 个 Ubuntu Server 20.04 实例运行,并具有以下信息:

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal
Run Code Online (Sandbox Code Playgroud)

两者都安装了 MySQL,其说明与我几个月前使用的说明相同。当我这样做时,突然间,对于其中一个人来说,sudo apt update出现以下内容:

Get:2 http://repo.mysql.com/apt/ubuntu focal InRelease [12.9 kB]
Hit:3 http://pe.archive.ubuntu.com/ubuntu focal InRelease
Ign:4 https://packages.erlang-solutions.com/ubuntu focal InRelease
Hit:5 https://packages.erlang-solutions.com/ubuntu focal Release
Get:6 http://pe.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Err:2 http://repo.mysql.com/apt/ubuntu focal InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
Get:9 http://pe.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:10 http://pe.archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:7 https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu focal InRelease
Fetched 349 kB in 3s (133 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.mysql.com/apt/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
W: Failed to fetch http://repo.mysql.com/apt/ubuntu/dists/focal/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
W: Some index files failed to download. They have been ignored, or old ones used instead.
Run Code Online (Sandbox Code Playgroud)

问题

  • 为什么会发生这样的事?
  • 怎么解决呢?

mat*_*igo 46

您将需要像这样导入存储库缺少的 GPG 密钥:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29
Run Code Online (Sandbox Code Playgroud)

然后更新:

sudo apt update
Run Code Online (Sandbox Code Playgroud)

你应该很好