Looking for some assistance installing libmongocrypt to take advantage of Client Side Field Level Encryption. We use the mongo-go-driver and it is my understanding that this doesn’t come packaged with libmongocrypt, so we are required to install this separately.
Our version of Debian is bullseye.
I followed the install steps in the docs but I’m running into issues (see logs below).
@Kevin_Albertson That seems to have solved the issue but now I’m getting the following error when building:
#17 102.5 # go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt
#17 102.5 /root/go/pkg/mod/go.mongodb.org/mongo-driver@v1.11.7/x/mongo/driver/mongocrypt/mongocrypt.go:296:16: could not determine kind of name for C.mongocrypt_crypt_shared_lib_version
#17 102.5 /root/go/pkg/mod/go.mongodb.org/mongo-driver@v1.11.7/x/mongo/driver/mongocrypt/mongocrypt.go:305:20: could not determine kind of name for C.mongocrypt_crypt_shared_lib_version_string
#17 102.5 /root/go/pkg/mod/go.mongodb.org/mongo-driver@v1.11.7/x/mongo/driver/mongocrypt/mongocrypt.go:169:11: could not determine kind of name for C.mongocrypt_ctx_rewrap_many_datakey_init
#17 102.5 /root/go/pkg/mod/go.mongodb.org/mongo-driver@v1.11.7/x/mongo/driver/mongocrypt/mongocrypt.go:263:12: could not determine kind of name for C.mongocrypt_ctx_setopt_contention_factor
#17 102.5 /root/go/pkg/mod/go.mongodb.org/mongo-driver@v1.11.7/x/mongo/driver/mongocrypt/mongocrypt.go:159:11: could not determine kind of name for C.mongocrypt_ctx_setopt_key_material
#17 102.5 /root/go/pkg/mod/go.mongodb.org/mongo-driver@v1.11.7/x/mongo/driver/mongocrypt/mongocrypt.go:257:12: could not determine kind of name for C.mongocrypt_ctx_setopt_query_type
#17 102.5 /root/go/pkg/mod/go.mongodb.org/mongo-driver@v1.11.7/x/mongo/driver/mongocrypt/mongocrypt.go:72:3: could not determine kind of name for C.mongocrypt_setopt_append_crypt_shared_lib_search_path
#17 102.5 /root/go/pkg/mod/go.mongodb.org/mongo-driver@v1.11.7/x/mongo/driver/mongocrypt/mongocrypt.go:64:3: could not determine kind of name for C.mongocrypt_setopt_bypass_query_analysis
#17 102.5 /root/go/pkg/mod/go.mongodb.org/mongo-driver@v1.11.7/x/mongo/driver/mongocrypt/mongocrypt.go:404:11: could not determine kind of name for C.mongocrypt_setopt_encrypted_field_config_map
#17 102.5 /root/go/pkg/mod/go.mongodb.org/mongo-driver@v1.11.7/x/mongo/driver/mongocrypt/mongocrypt.go:77:4: could not determine kind of name for C.mongocrypt_setopt_set_crypt_shared_lib_path_override
#17 102.5 /root/go/pkg/mod/go.mongodb.org/mongo-driver@v1.11.7/x/mongo/driver/mongocrypt/mongocrypt.go:81:2: could not determine kind of name for C.mongocrypt_setopt_use_need_kms_credentials_state
That error suggests the version of libmongocrypt is older than is supported by the Go driver.
I expect Go driver 1.11.7 requires libmongocrypt 1.5.2 or higher.
Try confirming the version of libmongocrypt with pkg-config:
$ pkg-config --modversion libmongocrypt
1.8.2
If the version of libmongocrypt shows as older, it may be due to another conflicting install of libmongocrypt. That may have happened if libmongocrypt was installed through the main package repository. Debian 11 packages libmongocrypt 1.1.0
What’s the best way to get a newer version? For install, I followed these instructions you linked on another thread. Thanks!
Edit: I think I figured out my issue. I’m running this docker build locally to test but I’m on arm64 so it’s not finding the right version (since it’s amd64) and just installing the default shipped with bullseye. When I spun up a docker container with linux/amd64, it appears to have installed the correct version.