我正在尝试在 Ubuntu 18 上安装 node.js 12 并按照说明操作,当我输入
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
我收到了下一条短信:
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 <[email protected]>
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
我想这就是为什么每次我跑步时
sudo apt-get install -y nodejs
我安装的是版本 8,而不是 10。
有人知道为什么会这样吗?我怎么会这样?
如果我的系统安全受到威胁,该如何解决?
答案1
你可能拥有过时的源 PPA。删除所有其他 apt 源:
sudo rm -rf /var/lib/apt/lists/*
sudo rm -rf /etc/apt/sources.list.d/*
sudo apt-get update
然后重试。