Problem
When running mongod/mongo/mongos, you got message like this:
mongod: error while loading shared libraries: libmozjs.so: cannot open shared object file: No such file or directory
Solution
Make sure you have xulrunner-dev installed:
sudo apt-get install xulrunner-dev
then find libmozjs on your filesystem:
sudo locate libmozjs
in lucid, it’s supposed to locate at:
/usr/lib/xulrunner-1.9.2.6/libmozjs.so
(and some other directories, such as firefox / thunderbird / seamonkey)
Just create a symbol link:
sudo ln -s /usr/lib/xulrunner-1.9.2.6/libmozjs.so /usr/lib/
try to restart mongodb:
sudo service mongodb start
take a look at process list:
ps aux | grep mongo
it works.
The post is brought to you by lekhonee v0.7
Very nice!!!! Thanks a lot.
Pingback: Instalasi MongoDB di Ubuntu 10.04 Lucid Lynx 64 bit « Preman Terminal
Pingback: blueberry cheese cake » Blog Archive » MongoDB를 Ubuntu에 패키지로 인스톨할때 libmozjs.so 파일을 찾지 못하는 문제
Pingback: Install MongoDB di Ubuntu | almuth.web.id
Thanks! it’s very helpfull!
Pingback: Tweets that mention Here comes the Sun » fixing "libmozjs" missing when using mongodb on Ubuntu lucid -- Topsy.com
Pingback: Ubuntu에 MongoDB 설치 후 libmozjs.so 문제
That really helped me a lot! Thanks!
Saved as a favorite, I really like your blog!
Thanks for the information – works a treat.