When installing MongoDB I encountered conflict. How do I tell which package it conflict with?

I tried both aptitude and apt-get, and I tried the 10gen version as well. But I’ve no idea what it is in conflict with?

It says:

[FAIL] Starting database: mongodb failed!
invoke-rc.d: initscript mongodb, action "start" failed.
dpkg: error processing mongodb-server (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

1 Answer 1


First of all, definitely stick with the 10gen version of the package - it is far more likely to be up to date than any of the distribution repositories.

In terms of the error, it looks like MongoDB is installing correctly, but is then failing to start. You did not mention which version of Linux you are using, but since you are using apt-get then I assume it is one of the Debian derivatives, or Debian itself of course.

In order to figure out why MongoDB is failing to start you will need to look in the logs for MongoDB. This may be different on your system, but the default based on the Debian mongod.conf would be:


Look in that file for the reason why it is failing to start. Feel free to add the details to your question and I can follow up on the cause, or if it is self explanatory (permissions, disk space etc.), then just let us know what you had to do to resolve it.

Finally, you should note that you could be running into this open bug:


If MongoDB is starting successfully but the service command or init script believes it is failing, then you are likely being hit by this problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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