Today I will describe in short how to compile C++ drivers for MongoDB over Ubuntu 14.04
Make new Directories
Getting the source code
git clone https://github.com/mongodb/mongo-cxx-driver.git
apt-get install scons libboost-all-dev build-essential libsasl2-2 libsasl2-dev
scons –prefix=/root/mongodb-client-install install –sharedclient –ssl –use-sasl-client
Copy shared libmongoclient.so to /usr/lib
cp libmongoclient.so /usr/lib
Update shared libraries in system
Installation is now complete. You can use any program that has been compiled with mongodb C++ drivers to execute over the system.
Compile MongoDB C++ Driver
One thought on “Compile MongoDB C++ Driver”
Hi there, I am getting an error while running “scons” even I followed steps properly. Below is the error:
scons: *** No SConstruct file found.
File “/usr/lib/scons/SCons/Script/Main.py”, line 905, in _main