when I put mongo command on terminal it gives me error like
mongo: error while loading shared libraries: libmozjs.so: cannot open shared object file: No such file or directory
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
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 keyserver.ubuntu.com --recv 7F0CEB10 sudo apt-add-repository \ "deb http://downloads.mongodb.org/distros/ubuntu 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.
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.
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.