Today I will describe in short how to compile C++ drivers for MongoDB over Ubuntu 14.04

Make new Directories

mkdir /root/mongodb-client-install

mkdir /root/mongodb-git

cd /root/mongodb-git

Getting the source code

git clone

Install pre-requisites

apt-get install scons libboost-all-dev build-essential libsasl2-2 libsasl2-dev

cd /root/mongodb-git/mongodb-cxx-driver

Start building

scons –prefix=/root/mongodb-client-install install –sharedclient –ssl –use-sasl-client

Copy shared to /usr/lib

cd /root/mongodb-client-install/lib

cp /usr/lib

Update shared libraries in system

ldconfig -v

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

  • September 26, 2017 at 10:13 am

    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/”, line 905, in _main


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.