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

I installed mongodb from the Ubuntu Software center, but when I want to run it from command line I get an error message like:

mongod --help for help and startup options
Sun Feb 12 10:51:14 [initandlisten] MongoDB starting : pid=2613 port=27017                  dbpath=/data/db/ 64-bit 
Sun Feb 12 10:51:14 [initandlisten] db version v1.8.2, pdfile version 4.5
Sun Feb 12 10:51:14 [initandlisten] git version: nogitversion
Sun Feb 12 10:51:14 [initandlisten] build sys info: Linux allspice 2.6.24-28-server #1 SMP Wed Aug 18 21:17:51 UTC 2010 x86_64 BOOST_LIB_VERSION=1_46_1
Sun Feb 12 10:51:14 [initandlisten] exception in initAndListen std::exception: Unable to create / open lock file for lockfilepath: /data/db/mongod.lock errno:13 Permission denied, terminating
Sun Feb 12 10:51:14 dbexit: 
Sun Feb 12 10:51:14 [initandlisten] shutdown: going to close listening sockets...
Sun Feb 12 10:51:14 [initandlisten] shutdown: going to flush diaglog...
Sun Feb 12 10:51:14 [initandlisten] shutdown: going to close sockets...
Sun Feb 12 10:51:14 [initandlisten] shutdown: waiting for fs preallocator...
Sun Feb 12 10:51:14 [initandlisten] shutdown: closing all files...
Sun Feb 12 10:51:14 closeAllFiles() finished
Sun Feb 12 10:51:14 [initandlisten] shutdown: removing fs lock...
Sun Feb 12 10:51:14 [initandlisten] couldn't remove fs lock errno:9 Bad file descriptor
Sun Feb 12 10:51:14 dbexit: really exiting now

I tried to create a repertory /data/db from my root but for some reason it's not working. Does anyone have a pointer?

share|improve this question
add comment

1 Answer 1

What kind of file system are using on /data/.. ? I imagine it could be a problem if you are using NTFS on that mount point.

Another problem could be the version of BOOST you have installed. I am not sure if MongoDB will work with BOOST 1.46. In the build description for Windows at least, they state:

We have successfully compiled version 1.42 – you might want to try that version or higher, but not 1.45 or later. 1.45 changed the interface to the boost::filesystem library and we've yet to catch up. See additional notes section at end of this page too.

share|improve this answer
add comment

Your Answer

 
discard

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.