2

I'm trying to install mongodb by following this manual (i'm using ubuntu 16.10) I've successfully installed mongodb before but I got an error so i uninstalled mongodb.

When I try to install it again i got this error when i enter sudo apt-get install -y mongodb-org on my terminal:

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
Michael
  • 55
  • 2
  • 9
  • you may want to ask on AskUbuntu: http://askubuntu.com/search?q=mongodb+install –  Mar 21 '17 at 15:10

2 Answers2

1

You can instal it with:

sudo apt-get install -y --allow-unauthenticated mongodb-org

but note that it wouldn't authenticate the package that you install.

Keep in mind that Ubuntu 16.10 is not one the supported platforms:

See this tutorial for a recommended installation of Mongo on Ubuntu:

rsp
  • 107,747
  • 29
  • 201
  • 177
1

If you installed MongoDB once with the same method you are using right now (the same described here), your issue could be due to:

  1. The packages key has been changed and you need to update it; try:

    sudo apt-key update
    sudo apt-get update
    

then install again;

  1. You are now behind a proxy and apt-get is not working properly when downloading either the packages or the keys.

Hope it helps! :)

Brutus
  • 790
  • 3
  • 10
  • 27