Install libmongocrypt安装libmongocrypt
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 Service.libmongocrypt
。该库执行加密和解密,并管理驱动程序和键管理服务之间的通信。
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.libmongocrypt
,请检查驱动程序兼容性表中是否将其列为依赖项。
Do not build 不要从源代码构建libmongocrypt
from source. Use one of the installation methods listed on this page.libmongocrypt
。请使用本页列出的其中一种安装方法。
macOS Installation安装
brew install mongodb/brew/libmongocrypt
Windows InstallationWindows安装
Click here单击此处 to begin a download with the latest release binary and
includes
directory.开始下载最新版本的二进制文件和includes目录。
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:将MongoDB存储库添加到包源中:
Change 将以下shell命令中的<release>
in the following shell command to your platform release (e.g. "xenial" or "buster").<release>
更改为您的平台版本(例如“xenial”或“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
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:将MongoDB存储库添加到包源中:
Change 将以下shell命令中的<release>
in the following shell command to your platform release (e.g. "xenial" or "buster").<release>
更改为您的平台版本(例如“xenial”或“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
:libmongocrypt
:
sudo apt-get install -y libmongocrypt-dev
RedHat
Create a repository file for the 为libmongocrypt
package:libmongocrypt
包创建存储库文件:
[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:libmongocrypt
包:
sudo yum install -y libmongocrypt
Amazon Linux 2
Create a repository file for the 为libmongocrypt
package:libmongocrypt
包创建存储库文件:
[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:libmongocrypt
包:
sudo yum install -y libmongocrypt
Amazon Linux
Create a repository file for the 为libmongocrypt
package:libmongocrypt
包创建存储库文件:
[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:libmongocrypt
包:
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:将存储库添加到包源:
Change 将以下shell命令中的<release>
in the following shell command to your platform release (e.g. "12" or "15").<release>
更改为您的平台版本(例如“12”或“15”)。
sudo zypper addrepo --gpgcheck "https://libmongocrypt.s3.amazonaws.com/zypper/suse/<release>/libmongocrypt/1.8/x86_64" libmongocrypt
Install the 安装libmongocrypt
package:libmongocrypt
包:
sudo zypper -n install libmongocrypt