Score:2

MySQL: An error occurred during the signature verification

kz flag

Through VirtualBox, even in different machines, I have 2 Ubuntu Server 20.04 instances running with the following info:

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal

Both have MySQL installed with the same instructions that I used since months ago. Suddenly just for one of them when I do sudo apt update appears the following:

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.

Questions

  • Why did do happen this?
  • How to solve it?
Manuel Jordan avatar
kz flag
It could be the answer of question 2, but what about the 1?
Someone avatar
my flag
It's because you've missing GPG keys.
Manuel Jordan avatar
kz flag
But why happened that?, in the same instance many times MySQL was updated without any problem with `sudo apt update` and later of course with `sudo apt upgrade`. Why suddenly the `GPG keys` are missing?
Someone avatar
my flag
Well, that's because you did something strange with your system... How can I or anyone tell?
Score:5
in flag

You will want to import the missing GPG keys for the repository like this:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29

Then update:

sudo apt update

You should be good

rimkashox avatar
pk flag
This was useful for building old 1.10.x airflow containers. Thanks a lot!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.