infrastructure-as-code-tutorial icon indicating copy to clipboard operation
infrastructure-as-code-tutorial copied to clipboard

In "Install MongoDB"

Open j-i-m-s-t-e-r opened this issue 5 years ago • 1 comments

Get error below running "sudo apt-get install -y mongodb-org" :

"Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: grub-pc-bin Use 'sudo apt autoremove' to remove it. 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 0 not upgraded. Need to get 51.8 MB of archives. After this operation, 215 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

I guess "--allow-unauthenticated" will work but at users own risk.

j-i-m-s-t-e-r avatar Apr 29 '20 17:04 j-i-m-s-t-e-r

the details for Mongodb are out of date and need to be updated (someone has already made a pull request)

  1. wget -qO - https://www.mongodb.org/static/pgp/server-3.2.asc | sudo apt-key add -
  2. echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
  3. sudo apt-get update
  4. sudo apt-get install -y mongodb-org

vietpham6375 avatar Jan 27 '21 14:01 vietpham6375