Mongo-cxx driver (4.0.0) error when building from source on linux mint

Hi, I am having some problems when trying to build mongo-cxx-driver-r4.0.0 from source on linux mint.

After executing “cmake … -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17”, it outputs some text about the dependency, modules and stuff.
And then it prints “CMake Error at build/_deps/mongo-c-driver-src/src/libmongoc/CMakeLists.txt:866 (message):
MONGODB-AWS requires a crypto library”

I searched about it on google but didn’t find anything related, later I even asked it to chatgpt, and it said to install libmongocrypt. I insatlled libmongocrypt but it didn’t solve the issue.

I am probably missing something or doing it the wrong way, but I really don’t know what because I am still a beginner. Please help me resolve this issue.
Thanks in advance! :slight_smile:

With your Linux Mint package manager, make sure libcrypto is installed.
If the build doesn’t find it, try adding these to the command line (assuming this is where the includes and .so for libcrypto get installed.

-DLibCrypto_INCLUDE_DIR=/usr/include -DLibCrypto_LIBRARY=/usr/lib64/libcrypto.so 

Hi, thanks for replying!

Installing libcrypto++8 did work, but now it says “CMake Error at CMakeLists.txt:220 (message):
BUILD_VERSION not specified and could not be calculated (script invocation
failed); specify in CMake command, -DBUILD_VERSION=”

I don’t know what build version I need to specify here

Please use the release tarball - that should have the VERSION_CURRENT file under the build folder.

Hey, using the release tarball worked and now I have mongocxx installed on my system.
Thanks for your help!