Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

when I put mongo command on terminal it gives me error like

mongo: error while loading shared libraries: cannot open shared object file: No such file or directory

share|improve this question
up vote 1 down vote accepted

i guess you installed mongodb by this command :

 sudo apt-get install mongodb

if then try this

sudo apt-get --purge remove mongodb
sudo apt-key adv --keyserver --recv 7F0CEB10
sudo apt-add-repository \
"deb 10.4 10gen"
sudo apt-get update
sudo apt-get install mongodb-snapshot

Here is a nice tutorial about Getting started with MongoDB under Ubuntu

Hope this helps.

UPDATE: This bug is fixed in the version 1:1.2.2-1ubuntu1.1. see the bug entry.
You can download it here. 1:1.2.2-1ubuntu1.1

share|improve this answer
@karthik: Thank you for editing ... – aneeshep Dec 31 '10 at 10:15

This sounds like you simply downloaded mongodb tarball and installed it without all of the dependencies.

You should either download the deb file or setup apt to get the deb from the 10gen repos. See here.

Your error is most likely due to the fact that you're missing the xulrunner package, which is part of the mozilla/firefox stuff. Mongo uses the javascript engine that is part of firefox.

One note: due to the fact that mongo depends on xulrunner, xulrunner depends on lots of other things, be prepared to install lots of seemingly unnecessary packages to get mongo running.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.