13

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?

2
  • It's REALLY annoying that questions like this keep getting closed. They don't have answers that work consistently, and claiming they do is akin to religious faith... The only way I was able to get this working was by (re)installing the apt setup package from the Oracle site - dev.mysql.com/downloads/repo/apt Jan 13 at 2:14
  • The answer(s) worked in peace ... Jan 15 at 16:09

1 Answer 1

14

Has been answered previously. The only thing you need to change is the reported public key.

The following command was the solution there:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C 
9
  • And the referred link was posted by myself time ago :) - yes the following command was the solution sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C Dec 15, 2023 at 15:20
  • 5
    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C did not help in my case, i also needed to update /etc/apt/keyrings/mysql.gpg with gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B7B3B788A8D3785C && rm /etc/apt/keyrings/mysql.gpg && gpg --output /etc/apt/keyrings/mysql.gpg --export B7B3B788A8D3785C because i was still getting the same errors as in the original post Dec 19, 2023 at 15:14
  • @bigbear3001 interesting your situation ... Dec 19, 2023 at 22:08
  • @bigbear3001, I have the same situation, but even replacing this file doesn't fix it. been trying with apt-key export & gpg dearmour, but nothing so far... Jan 24 at 14:33
  • 1
    hkp:// and port :80 are needed. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B7B3B788A8D3785C More info: unix.stackexchange.com/questions/399027/… Mar 7 at 10:39

Not the answer you're looking for? Browse other questions tagged .