How to fix apt update after to upgrade the mysql.list file?

Hello Friends

After to did do an upgrade through VirtualBox for Ubuntu Desktop 20.04 to 22.04 - focal to jammy - at the /etc/apt/sources.list.d directory exists the mysql.list file.

According with a research was indicated to open that file and change from local to jammy. Therefore I have now

### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out entries below, but any other modifications may be lost.
# Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications.
deb http://repo.mysql.com/apt/ubuntu/ jammy mysql-apt-config
deb http://repo.mysql.com/apt/ubuntu/ jammy mysql-8.0
deb http://repo.mysql.com/apt/ubuntu/ jammy mysql-tools
#deb http://repo.mysql.com/apt/ubuntu/ jammy mysql-tools-preview
deb-src http://repo.mysql.com/apt/ubuntu/ jammy mysql-8.0
manueljordan@mac2013-vb143:/etc/apt/sources.list.d$ 

Now when is executed the sudo apt update command happens the following:

sudo apt update
Get:1 http://repo.mysql.com/apt/ubuntu jammy InRelease [20.2 kB]
Hit:2 https://download.docker.com/linux/ubuntu focal InRelease                                                                       
Hit:3 https://dl.google.com/linux/chrome/deb stable InRelease                                                                        
Hit:4 http://security.ubuntu.com/ubuntu jammy-security InRelease    
Hit:5 http://pe.archive.ubuntu.com/ubuntu jammy InRelease
Hit:6 http://pe.archive.ubuntu.com/ubuntu jammy-updates InRelease
Err:1 http://repo.mysql.com/apt/ubuntu jammy InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7B3B788A8D3785C
Hit:7 http://pe.archive.ubuntu.com/ubuntu jammy-backports InRelease
Fetched 20.2 kB in 2s (11.7 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
16 packages can be upgraded. Run 'apt list --upgradable' to see them.
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 jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7B3B788A8D3785C
W: Failed to fetch http://repo.mysql.com/apt/ubuntu/dists/jammy/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7B3B788A8D3785C
W: Some index files failed to download. They have been ignored, or old ones used instead.

As you can see there are many errors

How to fix apt update after to upgrade the mysql.list file?

1 Like

The solution was

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C
3 Likes