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.
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:
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:
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:
Then Update the Package Lists again.