Symptoms
Ubuntu 20.04 update fails due to the expiration of the mysql repo GPG signing key.
# The following signatures were invalid: EXPKEYSIG B7B3B788A8D3785C MySQL Release Engineering <mysql-build@oss.oracle.com>
An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://repo.mysql.com/apt/ubuntu focal InRelease: The following signatures were invalid: EXPKEYSIG B7B3B788A8D3785C MySQL Release Engineering <mysql-build@oss.oracle.com>
Failed to fetch https://repo.mysql.com/apt/ubuntu/dists/focal/InRelease The following signatures were invalid: EXPKEYSIG B7B3B788A8D3785C MySQL Release Engineering <mysql-build@oss.oracle.com>
Cause
The installed MySQL GPG key has expired. Expired key signatures are invalid and cause package updates to fail.
Resolution
MySQL has updated the GPG key expiration date. Installing the new updated key or refreshing the existing key resolves the issue.
Get the new key that was released after the old one expired.
# gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C
Replace the key file used by the MySQL repo.
# gpg --export B7B3B788A8D3785C | sudo tee /usr/share/keyrings/mysql-archive-keyring.gpg > /dev/null
Update the public key as well.
# apt-key adv --keyserver hkps://keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C
Run the update command as follows:
# apt update
Try the following alternative solution if the above didn't solve the problem.
Download the fresh key.
# curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xB7B3B788A8D3785C" -o /tmp/fresh.asc
Import the new key.
# gpg --import /tmp/fresh.asc
Export the key to the new location.
# gpg --output /usr/share/keyrings/mysql-apt-config.gpg --export BCA43417C3B485DD128EC6D4B7B3B788A8D3785C
Run the update command.
# apt update
Comments
0 comments
Article is closed for comments.