MySQL 8 apt Error The following signatures were invalid
When trying to install MySQL 8 on Ubuntu 18.04, i get following error
root@ssdnodes-45790:~# apt update Ign:1 http://download.webmin.com/download/repository sarge InRelease Hit:2 http://download.webmin.com/download/repository sarge Release Get:3 http://repo.mysql.com/apt/ubuntu bionic InRelease [16.9 kB] Hit:5 http://archive.ubuntu.com/ubuntu cosmic InRelease Hit:6 http://archive.ubuntu.com/ubuntu cosmic-security InRelease Err:3 http://repo.mysql.com/apt/ubuntu bionic InRelease The following signatures were invalid: EXPKEYSIG 8C718D3B5072E1F5 MySQL Release EngineeringHit:7 http://archive.ubuntu.com/ubuntu cosmic-updates InRelease Reading package lists... Done W: GPG error: http://repo.mysql.com/apt/ubuntu bionic InRelease: The following signatures were invalid: EXPKEYSIG 8C718D3B5072E1F5 MySQL Release Engineering E: The repository 'http://repo.mysql.com/apt/ubuntu bionic InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. root@ssdnodes-45790:~#
To fix this error, run
apt-key adv --keyserver keys.gnupg.net --recv-keys 8C718D3B5072E1F5
Now apt update will work.
To list keys, run
root@ssdnodes-45790:~# apt-key list /etc/apt/trusted.gpg -------------------- pub dsa1024 2003-02-03 [SCA] [expires: 2022-02-16] A4A9 4068 76FC BD3C 4567 70C8 8C71 8D3B 5072 E1F5 uid [ unknown] MySQL Release Engineeringpub dsa1024 2002-02-28 [SCA] 1719 003A CE3E 5A41 E2DE 70DF D97A 3AE9 11F6 3C51 uid [ unknown] Jamie Cameron sub elg1024 2002-02-28 [E] /etc/apt/trusted.gpg.d/ondrej_ubuntu_php.gpg -------------------------------------------- pub rsa1024 2009-01-26 [SC] 14AA 40EC 0831 7567 56D7 F66C 4F4E A0AA E526 7A6C uid [ unknown] Launchpad PPA for Ondřej Surý /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-archive.gpg ------------------------------------------------------ pub rsa4096 2012-05-11 [SC] 790B C727 7767 219C 42C8 6F93 3B4F E6AC C0B2 1F32 uid [ unknown] Ubuntu Archive Automatic Signing Key (2012) /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg ------------------------------------------------------ pub rsa4096 2012-05-11 [SC] 8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092 uid [ unknown] Ubuntu CD Image Automatic Signing Key (2012) /etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg ------------------------------------------------------ pub rsa4096 2018-09-17 [SC] F6EC B376 2474 EDA9 D21B 7022 8719 20D1 991B C93C uid [ unknown] Ubuntu Archive Automatic Signing Key (2018) root@ssdnodes-45790:~#