Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I have installed and downloaded and built mongodb, and just one works.

$ mongo

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

$ /opt/mongo/bin/mongo

/opt/mongo/bin/mongo: error while loading shared libraries: libboost_system-mt.so.1.38.0: cannot open shared object file: No such file or directory

$ /usr/bin/mongo

MongoDB shell version: 1.6.5
connecting to: test

I can remove the installation via apt-get. But how do I remove all things mongo that were built with make, and get a clean system? I followed this guide to build and install mongodb.


share|improve this question

1 Answer 1

up vote 3 down vote accepted

From the source, create a .deb package corresponding to the manual install procedure using checkinstall:

sudo checkinstall make install

Once the package is created and installed you can remove it:

sudo dpkg -r package_name

Usually it's better to use checkinstall during initial installation, as it allows you to easily rollback the install.

share|improve this answer
well, that doesnt answer my question of how to remove my current executable, but maybe if I manually do a which mongo and remove that, it should work. Ill remember to do a checkinstall next time on. –  theTuxRacer Feb 25 '11 at 5:02
yes you rebuild/install the package as explained it will overwrite your current binary, dpkg -r will then remove not only the executable but all files related to it. You can manually remove the mongo binary, however that will not remove other files that may have been installed and which are no longer required. –  João Pinto Feb 25 '11 at 9:57

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.