Artemmkin / infrastructure-as-code-tutorial

Infrastructure As Code Tutorial. Covers Packer, Terraform, Ansible, Vagrant, Docker, Docker Compose, Kubernetes
Apache License 2.0
2.27k stars 423 forks source link

In "Install MongoDB" #24

Open j-i-m-s-t-e-r opened 4 years ago

j-i-m-s-t-e-r commented 4 years ago

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.

vietpham6375 commented 3 years ago

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