Report this

What is the reason for this report?

Signatures couldn't be verified because public key not available

Posted on March 14, 2024

Hi all,

When I run sudo apt update, I get the following:

 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7B3B788A8D3785C
Fetched 278 kB in 2s (167 kB/s)
Reading package lists... Done
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 B7B3B788A8D3785C
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 B7B3B788A8D3785C
W: Some index files failed to download. They have been ignored, or old ones used instead.

I tried what was suggested in this community post to no avail. Does anyone have any other suggestions?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
0

Accepted Answer

Heya,

The error you’re encountering indicates that the APT package manager is unable to verify the GPG signature of the MySQL repository because it lacks the necessary public key. This usually happens when a repository is added but its corresponding GPG key is not imported. To resolve this, you need to add the missing public key. The key ID B7B3B788A8D3785C is provided in your error message.

Let’s try another approach from the one in the post you mentioned:

Add the Repository Key:

Open a terminal.

Execute the following command to import the key:

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

This command tells apt-key to retrieve the key from a keyserver and add it to your system.

Update the Package Lists:

After importing the key, update the package lists:

sudo apt update

This will refresh the list of available packages and incorporate the changes made by adding the new key.

If for some reason, the apt-key adv command does not work (which can happen in certain environments or due to network issues), you can try an alternative method:

Add the Key Using an Alternative Method:

You can download the key and add it manually. Run:

sudo gpg --keyserver keyserver.ubuntu.com --recv B7B3B788A8D3785C
sudo gpg --export --armor B7B3B788A8D3785C | sudo apt-key add -

Then Update the Package Lists again.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.