Unable to locate package libmongocrypt using apt-get

I have try to install libmongocrypt using apt-get on Unbuntu jammy distribution in according to the guide: https://www.mongodb.com/docs/manual/core/queryable-encryption/reference/libmongocrypt.
I run the following command to set the respository:
echo “deb https://libmongocrypt.s3.amazonaws.com/apt/ubuntu jammy/libmongocrypt/1.7 universe” | sudo tee /etc/apt/sources.list.d/libmongocrypt.list

sudo apt-get install -y libmongocrypt
output the error: Unable to locate package libmongocrypt

I check the repository url by Chrome: https://libmongocrypt.s3.amazonaws.com/apt/ubuntu/dists/jammy/libmongocrypt/1.7 It just shows an error xml document.

Is the repository url wrong or there any other problem?

Try libmongocrypt-dev also make sure you run sudo apt-get update first too.

Hello kurt_zhu and welcome,

Aside from a few languages, you shouldn’t need to install libmongocrypt yourself as it is packaged with most drivers. What language driver are you using? And please make sure to check either the Compatibility table - https://www.mongodb.com/docs/manual/core/queryable-encryption/reference/compatibility/#std-label-qe-compatibility-reference for Queryable Encryption or the Compatibility table here - https://www.mongodb.com/docs/manual/core/csfle/reference/compatibility/#std-label-csfle-compatibility-reference for Client-Side Field Level Encryption to ensure you are using a supported driver.


Thanks. I have run “apt-get install libmongocrypt-dev”. And I have found it is installed at “/usr/lib/x86_64-linux-gnu/libmongocrypt.so.0.0.0”,

But i have a doubt still: why can not i enter the directory? https://libmongocrypt.s3.amazonaws.com/apt/ubuntu/dists/jammy/libmongocrypt/1.7

For other repositories, such as
Index of /ubuntu/dists/jammy/multiverse,
I can enter always.

Hi Cynthia,
I use nodejs and i have installed the mongodb-client-encryption for nodejs. Now I know i needn’t install libmongocrypt.
And the test has success.

That is great to hear. I’m glad it is working!