If you are facing signatures were invalid or EXPKEYSIG or KEYEXPIRED error in Debian or Ubuntu then this might be help you to solve the problem.
For example:-
Note:- All command are executed by root privileges.
Step 1:-
Use apt-key utility to list down all known key's.
You can directly find expire key adding grep in command.
For example:-
Note:- All command are executed by root privileges.
"Err:4 http://repo.mysql.com/apt/ubuntu bionic InRelease The following signatures were invalid: EXPKEYSIG 8C718D3B5072E1F5 MySQL Release Engineering "
Step 1:-
Use apt-key utility to list down all known key's.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | huntechpedia@Ubuntu-VM:~$ apt-key list /etc/apt/trusted.gpg -------------------- pub dsa1024 2003-02-03 [SCA] [expired: 2019-02-17] A4A9 4068 76FC BD3C 4567 70C8 8C71 8D3B 5072 E1F5 uid [ expired] MySQL Release Engineering pub rsa4096 2016-04-12 [SC] EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796 uid [ unknown] Google Inc. (Linux Packages Signing Authority) sub rsa4096 2016-04-12 [S] [expires: 2019-04-12] sub rsa4096 2017-01-24 [S] [expires: 2020-01-24] pub rsa2048 2016-06-22 [SC] [expires: 2021-06-21] D404 0146 BE39 7250 9FD5 7FC7 1F30 45A5 DF75 87C3 uid [ unknown] Skype Linux Client Repository sub rsa2048 2016-06-22 [E] [expires: 2021-06-21] pub rsa4096 2017-03-13 [SC] 8CAE 012E BFAC 38B1 7A93 7CD8 C5E2 2450 0C12 89C0 uid [ unknown] TeamViewer GmbH (TeamViewer Linux 2017) sub rsa4096 2017-03-13 [E] pub rsa4096 2016-10-05 [SC] 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310 uid [ unknown] Yarn Packaging sub rsa4096 2016-10-05 [E] sub rsa4096 2019-01-02 [S] [expires: 2020-02-02] sub rsa4096 2019-01-11 [S] [expires: 2020-02-02] /etc/apt/trusted.gpg.d/microsoft.gpg ------------------------------------ pub rsa2048 2015-10-28 [SC] BC52 8686 B50D 79E3 39D3 721C EB3E 94AD BE12 29CF uid [ unknown] Microsoft (Release signing) /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) |
You can directly find expire key adding grep in command.
apt-key list | grep expired
You will get output like,
pub dsa1024 2003-02-03 [SCA] [expired: 2019-02-17]
Step 2:-
Now we are going to update the KEY.
We are using key which we found in step1.
Command to update key is,
apt-key adv --keyserver keys.gnupg.net --recv-keys [KEY]
Now put key at the place of [KEY] in above command,
apt-key adv --keyserver keys.gnupg.net --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5
You will get output like,
huntechpedia@Ubuntu-VM:~$ sudo apt-key adv --keyserver keys.gnupg.net --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5
[sudo] password for krawler:
Executing: /tmp/apt-key-gpghome.bhdLfYcSQ5/gpg.1.sh --keyserver keys.gnupg.net --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5
gpg: key 8C718D3B5072E1F5: 3 duplicate signatures removed
gpg: key 8C718D3B5072E1F5: 96 signatures not checked due to missing keys
gpg: key 8C718D3B5072E1F5: "MySQL Release Engineering " 23 new signatures
gpg: Total number processed: 1
gpg: new signatures: 23
Step 3:-
Now you have to run update and upgrade command.
apt update -y && apt upgrade -y
That's it. Done!!!
Problem Solved. Let me know it help you or not in comments.


0 Comments