apt/apt-get:The following signatures were invalid: KEYEXPIRED
Posted giantbranch
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了apt/apt-get:The following signatures were invalid: KEYEXPIRED相关的知识,希望对你有一定的参考价值。
查询过期的key
sudo apt-key list | grep "expired: "
再更新这个key ,2007B954是查询出来的KEY
sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 2007B954
key server可能不一定全部通用
例子
giantbranch@ubuntu:~$ sudo apt-key list | grep "expired: "
pub 4096R/2007B954 2012-12-06 [expired: 2019-09-02]
pub 4096R/473041FA 2010-08-27 [expired: 2018-03-05]
pub 4096R/B98321F9 2010-08-07 [expired: 2017-08-05]
pub 4096R/65FFB764 2012-05-08 [expired: 2019-05-07]
具体例子
giantbranch@ubuntu:~$ sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 2007B954
Executing: /tmp/tmp.xtyH1a64lT/gpg.1.sh --keyserver
keys.gnupg.net
--recv-keys
2007B954
gpg: requesting key 2007B954 from hkp server keys.gnupg.net
gpg: key 2007B954: "Metasploit <metasploit@rapid7.com>" 9 new signatures
gpg: Total number processed: 1
gpg: new signatures: 9
或者一键ko
sudo apt-key list | grep "expired: " | sed -ne 's|pub .*/\\([^ ]*\\) .*|\\1|gp' | xargs -n1 sudo apt-key adv --keyserver keys.gnupg.net --recv-keys
以上是关于apt/apt-get:The following signatures were invalid: KEYEXPIRED的主要内容,如果未能解决你的问题,请参考以下文章
apt、apt-get、pkg、dpkg 等,在 Pydroid3 终端中找不到
Ubuntu中Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend)问题的解决