Install libmongocrypt for Queryable Encryption
On this page
Overview
Learn how to install libmongocrypt
, a core component of Queryable Encryption.
This library performs encryption and decryption and manages communication
between the driver and the Key Management System (KMS).
You do not need to install this library if it is packaged with the
driver that you are using. To learn which drivers require installation of
libmongocrypt
, check that it is listed as a dependency in the
Driver Compatibility Table.
Warning
Do not build libmongocrypt
from source. Use one of the installation
methods listed on this page.
macOS Installation
brew install mongodb/brew/libmongocrypt
Windows Installation
Click here
to begin a download with the latest release binary and includes
directory.
Linux Installation
Debian
Import the public key used to sign the package repositories:
sudo sh -c 'curl -s --location https://www.mongodb.org/static/pgp/libmongocrypt.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/libmongocrypt.gpg'
Add the MongoDB repository to your package sources:
Important
Change <release>
in the following shell command to your platform release (e.g. "xenial" or "buster").
echo "deb https://libmongocrypt.s3.amazonaws.com/apt/debian <release>/libmongocrypt/1.8 main" | sudo tee /etc/apt/sources.list.d/libmongocrypt.list
Update the package cache:
sudo apt-get update
Install libmongocrypt
:
sudo apt-get install -y libmongocrypt-dev
Ubuntu
Import the public key used to sign the package repositories:
sudo sh -c 'curl -s --location https://www.mongodb.org/static/pgp/libmongocrypt.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/libmongocrypt.gpg'
Add the MongoDB repository to your package sources:
Important
Change <release>
in the following shell command to your platform release (e.g. "xenial" or "buster").
echo "deb https://libmongocrypt.s3.amazonaws.com/apt/ubuntu <release>/libmongocrypt/1.8 universe" | sudo tee /etc/apt/sources.list.d/libmongocrypt.list
Update the package cache:
sudo apt-get update
Install libmongocrypt
:
sudo apt-get install -y libmongocrypt-dev
RedHat
Create a repository file for the libmongocrypt
package:
[libmongocrypt] name=libmongocrypt repository baseurl=https://libmongocrypt.s3.amazonaws.com/yum/redhat/$releasever/libmongocrypt/1.8/x86_64 gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/libmongocrypt.asc
Install the libmongocrypt
package:
sudo yum install -y libmongocrypt
Amazon Linux 2
Create a repository file for the libmongocrypt
package:
[libmongocrypt] name=libmongocrypt repository baseurl=https://libmongocrypt.s3.amazonaws.com/yum/amazon/2/libmongocrypt/1.8/x86_64 gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/libmongocrypt.asc
Install the libmongocrypt
package:
sudo yum install -y libmongocrypt
Amazon Linux
Create a repository file for the libmongocrypt
package:
[libmongocrypt] name=libmongocrypt repository baseurl=https://libmongocrypt.s3.amazonaws.com/yum/amazon/2013.03/libmongocrypt/1.8/x86_64 gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/libmongocrypt.asc
Install the libmongocrypt
package:
sudo yum install -y libmongocrypt
Suse
Import the public key used to sign the package repositories:
sudo rpm --import https://www.mongodb.org/static/pgp/libmongocrypt.asc
Add the repository to your package sources:
Important
Change <release>
in the following shell command to your platform release (e.g. "12" or "15").
sudo zypper addrepo --gpgcheck "https://libmongocrypt.s3.amazonaws.com/zypper/suse/<release>/libmongocrypt/1.8/x86_64" libmongocrypt
Install the libmongocrypt
package:
sudo zypper -n install libmongocrypt