Overview
Learn how to install libmongocrypt, a core component of Client-Side Field Level Encryption.
The libmongocrypt library performs encryption and decryption, and manages communication between the driver and the Key Management System (KMS).
Warning
Do not build libmongocrypt from source. Install and verify the package by following the steps on this page.
Steps
Select your operating system for installation steps.
To install on Windows:
Download libmongocrypt
Click here to see the latest libmongocrypt release.
Use gpg to verify the signature
The public key for libmongocrypt is available at https://pgp.mongodb.com
To install on Amazon Linux:
Create a repository file for the libmongocrypt package
Replace <linux-version> in the URL with the following, depending on which version of Amazon Linux you are using:
Amazon Linux 2023:
amazon/2023Amazon Linux 2:
amazon/2013.03Amazon Linux:
amazon/2
[libmongocrypt] name=libmongocrypt repository baseurl=https://libmongocrypt.s3.amazonaws.com/yum/<linux-version>/libmongocrypt/release/x86_64 gpgcheck=1 enabled=1 gpgkey=https://pgp.mongodb.com/libmongocrypt.asc
To install on Debian:
Configure the repository
Note
If you are using the extrepo repository manager, you can view and enable the libmongocrypt repository by running the commands:
extrepo search libmongocrypt sudo extrepo enable libmongocrypt
To configure the repository manually:
Import the public key used to sign the package repositories:
sudo sh -c 'curl -s --location https://pgp.mongodb.com/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 (for example "bookworm" or "trixie").echo "deb https://libmongocrypt.s3.amazonaws.com/apt/debian <release>/libmongocrypt/release main" | sudo tee /etc/apt/sources.list.d/libmongocrypt.list
To install on Red Hat Enterprise Linux:
To install on Suse:
To install on Ubuntu:
Configure the repository
Note
If you are using the extrepo repository manager, you can view and enable the libmongocrypt repository by running the commands:
extrepo search libmongocrypt sudo extrepo enable libmongocrypt
To configure the repository manually:
Import the public key used to sign the package repositories:
sudo sh -c 'curl -s --location https://pgp.mongodb.com/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 (for example "jammy" or "noble").echo "deb https://libmongocrypt.s3.amazonaws.com/apt/ubuntu <release>/libmongocrypt/release universe" | sudo tee /etc/apt/sources.list.d/libmongocrypt.list