Knowledgebase

Apt update falling with error: The following signatures were invalid: EXPKEYSIG B7B3B788A8D3785C MySQL Release Engineering <[email protected]> Print

  • 0

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 <[email protected]
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 <[email protected]>
Failed to fetch https://repo.mysql.com/apt/ubuntu/dists/focal/InRelease  The following signatures were invalid: EXPKEYSIG B7B3B788A8D3785C MySQL Release Engineering <[email protected]

 

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.

  1. Get the new key that was released after the old one expired.

    gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C

  2. Replace the key file used by the MySQL repo.

    gpg --export B7B3B788A8D3785C | sudo tee /usr/share/keyrings/mysql-archive-keyring.gpg > /dev/null

  3. Update the public key as well.

    apt-key adv --keyserver hkps://keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C

  4. Run the update command as follows:

    apt update

Try the following alternative solution if the above didn't solve the problem.

  1. Download the fresh key.

    curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xB7B3B788A8D3785C" -o /tmp/fresh.asc

  2. Import the new key.

    gpg --import /tmp/fresh.asc

  3. Export the key to the new location.

    gpg --output /usr/share/keyrings/mysql-apt-config.gpg --export BCA43417C3B485DD128EC6D4B7B3B788A8D3785C

  4. Run the update command.

    apt update


Was this answer helpful?
Back

Send Message