To set up your OS X computer for MongoDB development:
Available in the App Store. You only need to get the command line tools, if you don’t want to install the whole IDE.
SCons is the build tool used to compile mongo binaries. It is available from http://www.scons.org.
If you have easy_install or pip already installed, you can use them to install scons:
easy_install scons pip install scons
Install any needed prerequisites (see above).
Get the source code
git clone git://github.com/mongodb/mongo.git cd mongo
Pick a version to build (only use “master” if you’re doing development work).
List all tagged versions
git tag -l
Check out a tagged release
git checkout r2.4.0
Install. Use --prefix to specify where you want to install your binaries. Defaults to /usr/local.
scons --prefix=/opt/mongo install
Undefined symbols: “_PR_NewLock”, referenced from: _JS_Init in libjs.a.
If you are using the scons --release option, run without that option. That option attempts to use static libraries.