Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to set up Mongodb on my vps but when trying to start it:

service mongod start

It returns this error:

Starting mongod: /usr/bin/mongod: error while loading shared libraries: cannot open shared object file: No such file or directory

From what I read Mongodb runs on c++, so I've installed:

  gcc-c++.x86_64 0:4.4.6-4.el6                                                  

Dependency Installed:
  libstdc++-devel.x86_64 0:4.4.6-4.el6  

But I still get the error. Maybe it doesn't have permission. (Running Centos 6.3 64bit)

Ps: I'm an newbie.

share|improve this question
up vote 0 down vote accepted

You need to install libstdc++ to satisfy that dependency

So yum install libstdc++ should do the trick.

share|improve this answer
Failed to set locale, defaulting to C Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: * epel: * extras: * rpmforge: * updates: Setting up Install Process Package libstdc++-4.4.6-4.el6.x86_64 already installed and latest version Nothing to do – slownage Nov 18 '12 at 12:13
Curious then. How did you install MongoDB? It is not included in the standard RHEL/CentOS packages. – thanosk Nov 18 '12 at 12:26
yum install mongo-10gen mongo-10gen-server – slownage Nov 18 '12 at 12:27
If you have used the proper repo ie the x86_64 to install MongoDB then maybe it is a problem with the rpm. Can't readily test it atm to see if I get similar results. I assume you are executing all commands as root. Also just to be on the safe side execute locate . It should return as a result where that library is located – thanosk Nov 18 '12 at 12:31

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.