GPG error: http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release

版权声明:本文为博主夏日辉的原创文章,未经博主允许不得转载。 https://blog.csdn.net/shanpenghui/article/details/89137281

使用

sudo apt update

的时候出现下面的错误:

W: GPG error: http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D68FA50FEA312927
E: The repository 'http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

在这里插入图片描述

解决办法是:

  1. Ubuntu 软件包管理工具为了保证软件包的一致性和可靠性需要用 GPG 密钥检验软件包。使用下列命令导入 MongoDB 的 GPG 密钥:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
  1. 然后等待结果
  2. 如果成功,再次输入
sudo apt update

在这里插入图片描述

  1. 问题解决。

猜你喜欢

转载自blog.csdn.net/shanpenghui/article/details/89137281
gpg