我尝试按照manual安装mongodb(我使用的是ubuntu 16.10)我之前已经成功安装了mongodb,但是我收到错误,所以我卸载了mongodb。< / p>
当我尝试再次安装时,当我在终端上输入sudo apt-get install -y mongodb-org
时出现此错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
The following NEW packages will be installed:
mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell
mongodb-org-tools
0 upgraded, 5 newly installed, 0 to remove and 255 not upgraded.
Need to get 66,7 MB of archives.
After this operation, 269 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
mongodb-org-shell mongodb-org-server mongodb-org-mongos mongodb-org-tools
mongodb-org
E: There were unauthenticated packages and -y was used without --allow-unauthenticated
答案 0 :(得分:1)
您可以使用以下方式安装:
sudo apt-get install -y --allow-unauthenticated mongodb-org
但请注意,它不会对您安装的软件包进行身份验证。
请记住,Ubuntu 16.10不是受支持的平台之一:
有关在Ubuntu上推荐安装Mongo的信息,请参阅本教程:
答案 1 :(得分:0)
如果您使用现在使用的相同方法安装MongoDB一次(同样描述为here),则问题可能是由于:
包密钥已更改,您需要更新它;尝试:
sudo apt-key update
sudo apt-get update
然后重新安装;
希望它有所帮助! :)