gpt4 book ai didi

node.js - 由于 NO_PUBKEY not found 错误,无法在 Ubuntu 18.04.5 LTS 上安装 NodeJS 14 或 16

转载 作者:行者123 更新时间:2023-12-04 18:42:51 25 4
gpt4 key购买 nike

我的目标是安装 NodeJS。这是我正在运行的命令:

curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
由于以下错误而失败:
W: GPG error: https://releases.parity.io/deb release InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B1FE9FFD0787F8B
完整的堆栈跟踪可在附录 A 中找到。
我试图解决这个关键问题并运行以下命令:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B1FE9FFD0787F8B
结果是由于缺少 key 而没有检查一些签名,完整的堆栈跟踪可在附录 B 中获得。
然后,当我尝试使用命令更新我的系统时, sudo apt-get update ,我得到错误: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B1FE9FFD0787F8B .完整的堆栈跟踪可在附录 C 中获得。
如何解决 gpg key 错误以安装 NodeJS14 或更高版本?
附录 A
root@vultr:~# curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -

## Installing the NodeSource Node.js 16.x repo...


## Populating apt-get cache...

+ apt-get update
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Get:2 https://releases.parity.io/deb release InRelease [1,468 B]
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu bionic InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Err:2 https://releases.parity.io/deb release InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B1FE9FFD0787F8B
Hit:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done
W: GPG error: https://releases.parity.io/deb release InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B1FE9FFD0787F8B
E: The repository 'https://releases.parity.io/deb release 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.
Error executing the command, exiting
附录 B
Executing: /tmp/apt-key-gpghome.bZCjA8xQN8/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 3B1FE9FFD0787F8B
gpg: key FF0812D491B96798: 3 duplicate signatures removed
gpg: key FF0812D491B96798: 8 signatures not checked due to missing keys
gpg: key FF0812D491B96798: "Parity Security Team <security@parity.io>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
附录 C
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Get:2 https://releases.parity.io/deb release InRelease [1,468 B]
Hit:3 http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu bionic InRelease
Err:2 https://releases.parity.io/deb release InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B1FE9FFD0787F8B
Hit:4 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done
W: GPG error: https://releases.parity.io/deb release InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B1FE9FFD0787F8B
E: The repository 'https://releases.parity.io/deb release 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.
更新 1:添加 -kcurl :
root@vultr:~# curl -k -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
它没有改变任何东西:
## Installing the NodeSource Node.js 16.x repo...


## Populating apt-get cache...

+ apt-get update
Get:1 https://releases.parity.io/deb release InRelease [1,468 B]
Hit:2 http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu bionic InRelease
Err:1 https://releases.parity.io/deb release InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B1FE9FFD0787F8B
Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:4 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Reading package lists... Done
W: GPG error: https://releases.parity.io/deb release InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B1FE9FFD0787F8B
E: The repository 'https://releases.parity.io/deb release 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.
Error executing command, exiting```

最佳答案

显然releases.parity.io/deb 是未签名的。 This答案建议您可以添加[trusted=yes]/etc/apt/sources.list为了避免遇到这个错误。
我无法建议这有多安全。
编辑:
搜索以开头的行

deb https://releases.parity.io/deb
并将其更改为
deb [trusted=yes] https://releases.parity.io/deb
链接答案中提到的其他替代方案也可能值得一试。
更新 1:添加 [trusted=yes]在正确的文件中
文件 /etc/apt/sources.list.d/parity.list有这行: deb [signed-by=/usr/share/keyrings/parity.gpg] https://releases.parity.io/deb release main .
应修改此行以使其工作: deb [trusted=yes,signed-by=/usr/share/keyrings/parity.gpg] https://releases.parity.io/deb release main

关于node.js - 由于 NO_PUBKEY not found 错误,无法在 Ubuntu 18.04.5 LTS 上安装 NodeJS 14 或 16,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69701205/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com