Add the installation prefix of "libbson-1.0" to CMAKE_PREFIX_PATH or set "libbson-1.0_DIR" to a directory containing one of the above files. If "libbson-1.0" provides a separate development package or SDK, be sure it has been installed.
sudo apt-get install libmongoc-1.0-0
sudo apt-get install libbson-1.0
sudo apt-get install cmake libssl-dev libsasl2-dev
wget https://github.com/mongodb/mongo-c-driver/releases/download/1.16.2/mongo-c-driver-1.16.2.tar.gz
tar xzf mongo-c-driver-1.16.2.tar.gz
cd mongo-c-driver-1.16.2
mkdir cmake-build
cd cmake-build
cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..
sudo make install
git clone https://github.com/mongodb/mongo-cxx-driver.git \
--branch releases/stable --depth 1
cd mongo-cxx-driver/build
sudo cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DBSONCXX_POLY_USE_MNMLSTC=1 \
-DCMAKE_INSTALL_PREFIX=/usr/local
sudo make EP_mnmlstc_core
sudo make
sudo make install