14

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
  • 1,768
  • 7
  • 30
  • 50

1 Answers1

47

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

matigo
  • 22,138
  • 7
  • 45
  • 75
  • This was useful for building old 1.10.x airflow containers. Thanks a lot! – rimkashox Jan 05 '23 at 00:06
  • The latest key can be found in here https://itsfoss.community/t/how-to-fix-apt-update-after-to-upgrade-the-mysql-list-file/11546/2 – Ocastro Feb 15 '24 at 13:44
  • Behind a firewall, hkp:// and port :80 are needed. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B7B3B788A8D3785C The key id in this comment is from the year 2024. More info: https://unix.stackexchange.com/questions/399027/gpg-keyserver-receive-failed-server-indicated-a-failure/399091#399091 – Emil Carpenter Mar 07 '24 at 10:37
  • Correction: not a firewall issue. Port 11371 works also, even if it is closed by ufw. Without port number and hkp protocol, this does not work. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:11371 --recv-keys B7B3B788A8D3785C. More info in the link in my other comment. – Emil Carpenter Mar 07 '24 at 11:22