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
i guess you installed mongodb by this command :
if then try this
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.