无法在 ubuntu 17.04 上正确安装 mongodb

无法在 ubuntu 17.04 上正确安装 mongodb

每次我尝试做某事时,我的终端都会出现错误apt-get installupdate我猜这与安装 mongodb 有关。

我是 Linux 新手,我严格按照本指南进行安装。我找不到 17.04 版本的指南,所以我安装了 16.10,现在每次我尝试做某事时apt-get都会出现此错误:

Reading package lists... Done
W: GPG error: http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0
Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9ECBEC467F0CEB10 W: The repository 'http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0 Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

另外,我的顶部栏中还有一个警报:

发生错误,请从右键菜单或终端中的 apt-get 运行包管理器来查看错误原因,错误消息是:

Error brokenCount > 0. this usually means that your installed packages have unmet dependencies.

答案1

运行此命令:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6

然后

sudo apt-add-repository 'deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse'

然后

sudo apt update

相关内容