MySQL:在签名验证过程中发生了错误。

通过VirtualBox,即使在不同的机器上,我有两个运行着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

两者都安装了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.

问题
- 为什么会发生这种情况? - 如何解决它?

这可能是问题2的答案,但问题1呢? - Manuel Jordan
这是因为你缺少了 GPG 密钥。 - Error404
1但是为什么会发生这种情况呢?在很多次MySQL更新中,使用sudo apt update都没有任何问题,后来当然也用sudo apt upgrade成功了。为什么突然之间“GPG密钥”就消失了呢? - Manuel Jordan
嗯,那是因为你对系统做了一些奇怪的事情...我或者任何人怎么能知道呢? - Error404
1个回答

你需要像这样导入缺失的存储库GPG密钥:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29

然后更新:
sudo apt update

你应该没问题。

这对于构建旧的1.10.x airflow容器非常有用。非常感谢! - rimkashox