We're building Django's QE integration which uses PyMongo. I use Ubuntu 24.04 for development and on CI.
I started developing using MongoDB 7.0. When I switched to MongoDB 8.0, I encountered this initialization error:
pymongocrypt.errors.MongoCryptError: An existing crypt_shared library is loaded by the application at [/path/to/lib/mongo_crypt_v1.so], but the current call to mongocrypt_init() failed to find that same library
This is fixed by: export LD_LIBRARY_PATH=/path/to/lib/
however, anna.henningsen@mongodb.com says this shouldn't be required.
The problems seems specific with version 8.0.x and later of the shared library.
- No issue with MongoDB 7.0.25 + mongo_crypt_shared_v1-linux-x86_64-enterprise-ubuntu2204-7.0.25 (I use the ubuntu2204 shared library on Ubuntu 24.04 because one isn't available for 2404).
- With MongoDB 8.0.15 and mongo_crypt_shared_v1-linux-x86_64-enterprise-ubuntu2404-8.0.15: "An existing crypt_shared library is loaded... " error. [fixed by specifying LD_LIBRARY_PATH]
- With MongoDB 8.0.15 + mongo_crypt_shared_v1-linux-x86_64-enterprise-ubuntu2204-7.0.25, the application starts and runs, failing later (as expected) because of backward incompatible changes to queries: "csfle "analyze_query" failed: Enumeration value 'range' for field 'create.encryptedFields.fields.queryType' is not a valid value." [This configuration isn't expected to work, but it shows that version 7.0 of the shared library doesn't have the "An existing crypt_shared library is loaded... " initialization problem with MongoDB 8.0].
- backports
-
INTPYTHON-845 Document potential server version and crypt library version configuration issues
-
- Closed
-