Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am installing mongodb on ubuntu terminal from this url (http://mongojs.org/install-mongodb-ubuntu-11-04-natty)

I am on the step where you type in ./mongod

when I type that I get the following: bash: ./mongod cannot execute binary file error

can someone help me get over this obstacle? thanks.

share|improve this question

migrated from stackoverflow.com Jul 17 '12 at 4:39

This question came from our site for professional and enthusiast programmers.

1  
Is that the limit of your error? What is the output of "ldd /usr/bin/mongod" and "/usr/bin/mongod -vvvv"? –  Mark Hillick Jul 13 '12 at 9:02
    
ldd: no such file or directory<br />-ww:<br />ldd: .-ww no such file or directory –  user1522901 Jul 13 '12 at 15:56
    
Where is mongod installed? "which mongod" What happens when you run it in verbose mode? –  Mark Hillick Jul 13 '12 at 16:19
    
can you explain what verbose mode means? it is installed in /home/mongodb-linux-x86_64-2.0.6 –  user1522901 Jul 13 '12 at 16:28
    
With the "-vvvv" option above. So run /home/mongodb-linux-x86_64-2.0.6/bin/mongod -vvvv please. Also ldd should be in /usr/bin or maybe /usr/sbin. Can you also run "/usr/bin/ldd /home/mongodb-linux-x86_64-2.0.6/bin/mongod"? –  Mark Hillick Jul 13 '12 at 16:44

2 Answers 2

This is probably caused by an invalid installation. Follow the following steps on ubuntu to install Mongodb properly:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | sudo tee --append /etc/apt/sources.list.d/10gen.list
sudo apt-get update
sudo apt-get install mongodb-10gen

With this, you can now start your local mongo instance. Make sure to update your config file to change your data directory to where you want to have the DB files stored.

share|improve this answer
    
Did you actually read the link user1522901 posted? Those are the actual steps he/she claims to have followed. –  Mark Hillick Jul 14 '12 at 19:29
    
Mark, based on the error, I think it was safe to assume he did not use the package manager, but rather the manual option in the link he provided. It seems to me like he's missing some dependencies which would be resolved by installing using apt-get. –  Mohannad El-Barachi Jul 14 '12 at 19:43
    
Well he/she said that he/she did. I don't think apt-get will resolve that error. Regardless of that, you should have added it as a comment, not an answer. –  Mark Hillick Jul 14 '12 at 19:47

My only suggestion would be to check you're using the correct version (32-bit vs 64-bit). The link provided in the tutorial is 64-bit, which won't work if you're using a 32-bit machine.

share|improve this answer
    
I have 64 bit and I really don't know what to do –  user1522901 Jul 13 '12 at 7:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.