执行命令时出错,退出

Zen*_*nit 4 command-line mongodb nodejs

我正在尝试在 Ubuntu 18 上安装 node.js 12 并按照说明进行操作,当我输入

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
Run Code Online (Sandbox Code Playgroud)

我得到了下一个文本:

Reading package lists... Done                                                                                                                                                                                     
E: The repository 'http://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.4 Release' does not have a Release file.
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.
E: The repository 'http://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.0 Release' does not have a Release file.
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.
W: GPG error: http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_18.10  Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4ABE1AC7557BEFF9
E: The repository 'http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_18.10  Release' 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.
W: GPG error: http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 Release: The following signatures were invalid: EXPKEYSIG 58712A2291FA4AD5 MongoDB 3.6 Release Signing Key <packaging@mongodb.com>
E: The repository 'http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 Release' 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
Run Code Online (Sandbox Code Playgroud)

我想这就是我每次跑步的原因

sudo apt-get install -y nodejs 
Run Code Online (Sandbox Code Playgroud)

我得到的是 8 版而不是 10 版。
有人知道为什么会这样吗?我是怎么走到这一步的?
如果我的系统安全受到威胁,如何修复?

Oli*_*jon 7

您可能拥有过时的源 PPA。删除所有其他 apt 来源:

sudo rm -rf /var/lib/apt/lists/*
sudo rm -rf /etc/apt/sources.list.d/*
sudo apt-get update
Run Code Online (Sandbox Code Playgroud)

然后再试一次。