skip to Main Content

I tried to follow this on my Ubuntu 21.04, But I was getting the following error when I try to build using the Make command:

[ 39%] Downloading crypt_shared
Traceback (most recent call last):
File "/home/styles/Softwares/mongo-c-driver-1.22.0/build/mongodl.py", line 700, in
sys.exit(main())
File "/home/styles/Softwares/mongo-c-driver-1.22.0/build/mongodl.py", line 679, in main
target = args.target or infer_target()
File "/home/styles/Softwares/mongo-c-driver-1.22.0/build/mongodl.py", line 86, in infer_target
return _infer_target_os_rel()
File "/home/styles/Softwares/mongo-c-driver-1.22.0/build/mongodl.py", line 127, in _infer_target_os_rel
raise RuntimeError(
RuntimeError: We don’t know how to map ‘ubuntu’ version ‘21.10’ to a distribution download target. Please contribute!
gmake[2]: *** [src/libmongoc/CMakeFiles/get-crypt_shared.dir/build.make:80: src/libmongoc/mongo_crypt_v1.so] Error 1
gmake1: *** [CMakeFiles/Makefile2:2041: src/libmongoc/CMakeFiles/get-crypt_shared.dir/all] Error 2
gmake: *** [Makefile:182: all] Error 2

Is there a workaround to make it work or I can’t really work with mongocxx on my version of ubuntu ?

2

Answers


  1. I faced a different error with crypt_shared on Ubuntu 16.04 and build operation would throw error in downloading crypt_shared. So I used -DMONGOC_TEST_USE_CRYPT_SHARED=FALSE in cmake arguments and as per file src/libmongoc/CMakeLists.txt:860 of mongodb-c-driver-1.23.0, this means now the build will rely on mongocryptd instead. The build went ahead from this particular error.

    Login or Signup to reply.
  2. Modify the beginning of /build/mongodl.py to add your distribution. The line I added below will build a version compatible to 20.04 but you could also try changing it to 22.04.

    DISTRO_ID_TO_TARGET = {
    'ubuntu': {
        '22.*': 'ubuntu2204',
        '21.*': 'ubuntu2004',     # Added this line
        '20.*': 'ubuntu2004',
        '18.*': 'ubuntu1804',
        '16.*': 'ubuntu1604',
        '14.*': 'ubuntu1404',
    },
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search