Docs Menu
Docs Home
/
MongoDB Manual
/ / / / / /

Install libmongocrypt

On this page

  • Overview
  • macOS Installation
  • Windows Installation
  • Linux Installation
  • Debian
  • Ubuntu
  • RedHat
  • Amazon Linux 2
  • Amazon Linux
  • Suse
  • Next Steps

The libmongocrypt library performs encryption and decryption, and manages communication between the driver and the Key Management System (KMS). It is packaged with some drivers, but others require you to install it.

To see if you need to install libmongocrypt, check if it is listed as a dependency in the Drivers compatibility table.

Warning

Do not build libmongocrypt from source. Use one of the installation methods listed on this page.

brew install mongodb/brew/libmongocrypt

Click here to begin a download with the latest release binary and includes directory.

1

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'
2

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.12 main" | sudo tee /etc/apt/sources.list.d/libmongocrypt.list
3

Update the package cache:

sudo apt-get update
4

Install libmongocrypt:

sudo apt-get install -y libmongocrypt-dev
1

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'
2

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.12 universe" | sudo tee /etc/apt/sources.list.d/libmongocrypt.list
3

Update the package cache:

sudo apt-get update
4

Install libmongocrypt:

sudo apt-get install -y libmongocrypt-dev
1

Create a repository file for the libmongocrypt package:

[libmongocrypt]
name=libmongocrypt repository
baseurl=https://libmongocrypt.s3.amazonaws.com/yum/redhat/$releasever/libmongocrypt/1.12/x86_64
gpgcheck=1
enabled=1
gpgkey=https://pgp.mongodb.com/libmongocrypt.asc
2

Install the libmongocrypt package:

sudo yum install -y libmongocrypt
1

Create a repository file for the libmongocrypt package:

[libmongocrypt]
name=libmongocrypt repository
baseurl=https://libmongocrypt.s3.amazonaws.com/yum/amazon/2/libmongocrypt/1.12/x86_64
gpgcheck=1
enabled=1
gpgkey=https://pgp.mongodb.com/libmongocrypt.asc
2

Install the libmongocrypt package:

sudo yum install -y libmongocrypt
1

Create a repository file for the libmongocrypt package:

[libmongocrypt]
name=libmongocrypt repository
baseurl=https://libmongocrypt.s3.amazonaws.com/yum/amazon/2013.03/libmongocrypt/1.12/x86_64
gpgcheck=1
enabled=1
gpgkey=https://pgp.mongodb.com/libmongocrypt.asc
2

Install the libmongocrypt package:

sudo yum install -y libmongocrypt
1

Import the public key used to sign the package repositories:

sudo rpm --import https://pgp.mongodb.com/libmongocrypt.asc
2

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.12/x86_64" libmongocrypt
3

Install the libmongocrypt package:

sudo zypper -n install libmongocrypt

Once you have installed your driver dependencies, install and configure a library to continue setting up your deployment and development environment.

Back

Install a Driver