Ubuntu 16.04 错误:由于公钥不可用,无法验证以下签名

Ubuntu 16.04 错误:由于公钥不可用,无法验证以下签名

我运行apt-get update并看到此错误:

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1655A0AB68576280

如何消除该错误?日志:

Hit:1 http://cz.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://cz.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://cz.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:5 http://mirror.timeweb.ru/mariadb/repo/10.1/ubuntu xenial InRelease
Hit:6 https://deb.nodesource.com/node_4.x trusty InRelease
Err:6 https://deb.nodesource.com/node_4.x trusty InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1655A0AB68576280
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://deb.nodesource.com/node_4.x trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1655A0AB68576280
W: Failed to fetch https://deb.nodesource.com/node_4.x/dists/trusty/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1655A0AB68576280
W: Some index files failed to download. They have been ignored, or old ones used instead.

之前我只用这个删除了密钥如何删除使用 apt-key add - 添加的 gpg 密钥?

编辑:我只是试图从本手册中安装带有 nodejs 的 websockethttps://by-example.org/install-node-js-4-3-lts-on-ubuntu-16-04-xenial-xerus-lts/,在出现此错误之前,我运行了该手册中的前 3 个命令。

答案1

开始软件与更新从破折号中,转到“身份验证”选项卡以删除不正确的密钥。

您可以尝试从 Synaptic 安装 y-ppa-manager,然后从 Dash 启动 PPA Manager。单击“高级”图标,然后选择导入所有缺失的 gpg 密钥

更新#1:

要添加 PPA...

sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install y-ppa-manager
sudo y-ppa-manager

答案2

2022 版 =)

curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key --keyring /usr/share/keyrings/nodesource.gpg add -

最初我尝试按照 apt-key(顺便说一下,它已被弃用)的指示安装密钥,/etc/apt/trusted.gpg.d但不知何故失败了:

curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key --keyring /etc/apt/trusted.gpg.d/nodesource.gpg add -

相关内容