8

I already have mysql-server package installed!!!

I want to make sure I have the most recent MySQL in my Ubuntu. So (long time ago) I added repo.mysql.com/apt/ubuntu PPA. Recently I noticed errors related to this repository when doing apt update. Following this guide I've downloaded and imported public GPG key.

Now when I do sudo apt update I get this error:

Err:8 http://repo.mysql.com/apt/ubuntu cosmic InRelease
  The following signatures were invalid: EXPKEYSIG 8C718D3B5072E1F5 MySQL Release Engineering <mysql-build@oss.oracle.com>

OS information: Ubuntu 18.10

Should I worry about this invalid signature? How to fix the error?

6

The error you are seeing indicates that your key is expired.

You can list all keys on your system with the command sudo apt-key list if you wish to narrow the output you can always pipe the output through grep expired to obtain just a list of the expired keys.

For each expired key, issue the command sudo apt-key adv --keyserver keys.gnupg.net --recv-keys [KEY] where [KEY] is related to the number in question or in this case:

8C718D3B5072E1F5

sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 8C718D3B5072E1F5

keys.gnupg.net refers to the SKS keyserver pool, a number of PGP keyservers run by organisations and volunteers.

You can also search for the key via web interface at keys.gnupg.net

where you'll get a page like this:

enter image description here

Entering the key from the EXPKEYSIG preceded by 0x in the search box and searching should return results similar to this:

enter image description here

To the best of my knowledge the 8 hex digits is the short version (public key) you need to obtain an updated key with the command

sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 5072E1F5

Sources:

https://linux-audit.com/how-to-solve-an-expired-key-keyexpired-with-apt/ https://stackoverflow.com/questions/44768657/cannot-add-keys-from-keys-gnupg-net

3

Get the latest (not expired) MySQL APT repository from: https://dev.mysql.com/downloads/repo/apt/

Currently: https://repo.mysql.com//mysql-apt-config_0.8.13-1_all.deb

wget https://repo.mysql.com/mysql-apt-config_0.8.13-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb
sudo apt-get update
sudo apt install mysql-server
2

try running $sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 5072E1F5

source: https://bugs.mysql.com/bug.php?id=85029

2

Instruction for apt.

  1. download key

    A. from mysql website https://dev.mysql.com/doc/refman/8.0/en/checking-gpg-signature.html

    B. or from public repo shell> gpg --recv-keys 5072E1F5

  2. shell> gpg --import mysql_pubkey.asc

  3. shell> sudo apt-key add mysql_pubkey.asc
  • 1
    See my answer for a process that works to resolve expired keys regardless of package. – Elder Geek May 9 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.