AWS EC2 Ubuntu 12.04.1 LTS: deb command-not-found

Futur picture Futur · Nov 2, 2012 · Viewed 69.2k times · Source

When I tried to install mongoDb in my AWS EC2 Linux instance:Ubuntu 12.04.1 LTS,

deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen

I get this following error, meaning deb command is not found.

$ deb Sorry, command-not-found has crashed! Please file a bug report
at: https://bugs.launchpad.net/command-not-found/+filebug Please
include the following information with the report:
 
command-not-found version: 0.2.44

Can someone please help me find out how to install deb in my AWS instance?

Answer

jokerdino picture jokerdino · Nov 2, 2012

Deb is not a command. You need to edit your /etc/apt/sources.list file and add the following line

deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen

to the end of the file.

Then, update your system and then install MongoDB. Assuming mongodb is the package you need then run these commands:

sudo apt-get update
sudo apt-get install mongodb