apt-get 更新时出现 KEYEXPIRED 错误,并且 apt-key 列表中没有过期的密钥

iro*_*and 5 apt

我出错了 sudo apt-get update

Err:6 https://dl.yarnpkg.com/debian stable InRelease
  The following signatures were invalid: KEYEXPIRED 1507181400
Run Code Online (Sandbox Code Playgroud)

根据这个答案,过期的密钥由apt-key list.

$ LANG=C apt-key list | grep expired
$
Run Code Online (Sandbox Code Playgroud)

但它没有被命令显示。

我应该怎么做才能修复这个错误?我正在使用 Ubuntu 16.04.6 LTS。

iro*_*and 6

为了解决这个问题,我只需要通过以下命令获取新密钥。但是,我不知道为什么不能识别密钥已过期apt-key list

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
Run Code Online (Sandbox Code Playgroud)

  • 对我来说,这个新密钥的来源代替了:https://unix.stackexchange.com/a/655336/22947 (2认同)