MongoDB 4.0 GPG - 签名无效

MongoDB 4.0 GPG - Invalid Signatures

我正在 MongoDB 4.0.x 安装 Ubuntu 16.04 (Xenial),使用 https://docs.mongodb.com/v4.0/tutorial/install-mongodb-on-ubuntu/.

提供的说明

命令顺序为(在ubuntu:xenial-20190222docker容器内执行):

echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | tee /etc/apt/sources.list.d/mongodb.list


apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4

apt-key list

/etc/apt/trusted.gpg
--------------------
pub   1024D/437D05B5 2004-09-12
uid                  Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>
sub   2048g/79164387 2004-09-12

pub   4096R/C0B21F32 2012-05-11
uid                  Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>

pub   4096R/EFE21092 2012-05-11
uid                  Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>

pub   1024D/FBB75451 2004-12-30
uid                  Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>

pub   4096R/E52529D4 2018-04-18 [expires: 2023-04-17]
uid                  MongoDB 4.0 Release Signing Key <packaging@mongodb.com>


apt-get update


Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Ign:3 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 InRelease
Get:4 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 Release [3457 B]
Get:5 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 Release.gpg [801 B]
Ign:5 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 Release.gpg
Ign:6 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 InRelease
Get:7 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 Release [3457 B]
Get:8 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 Release.gpg [801 B]
Get:9 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0/multiverse amd64 Packages [12.5 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [1073 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Ign:8 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 Release.gpg
Get:12 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:13 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0/multiverse amd64 Packages [12.5 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB]
Get:15 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0/multiverse arm64 Packages [12.5 kB]
Get:16 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [12.7 kB]
Get:17 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [621 kB]
Get:18 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB]
Get:20 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [6282 B]
Get:21 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB]
Get:22 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [1443 kB]
Get:23 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [13.1 kB]
Get:24 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [1023 kB]
Get:25 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [19.3 kB]
Get:26 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [7942 B]
Get:27 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [8807 B]
Fetched 16.4 MB in 4s (3666 kB/s)
Reading package lists... Error!
W: GPG error: http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 Release: The following signatures were invalid: BADSIG 68818C72E52529D4 MongoDB 4.0 Release Signing Key <packaging@mongodb.com>
W: The repository 'http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 Release: The following signatures were invalid: BADSIG 68818C72E52529D4 MongoDB 4.0 Release Signing Key <packaging@mongodb.com>
W: The repository 'https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to stat /var/lib/apt/lists/partial/repo.mongodb.org_apt_ubuntu_dists_xenial_mongodb-org_4.0_Release - pkgAcqTransactionItem::TransactionState-stat (2: No such file or directory)
E: Failed to stat /var/lib/apt/lists/partial/repo.mongodb.org_apt_ubuntu_dists_xenial_mongodb-org_4.0_multiverse_binary-amd64_Packages.lz4 - pkgAcqTransactionItem::TransactionState-stat (2: No such file or directory)
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/repo.mongodb.org_apt_ubuntu_dists_xenial_mongodb-org_4.0_multiverse_binary-arm64_Packages.lz4
E: The package lists or status file could not be parsed or opened.

我的 Docker 文件:

FROM ubuntu:xenial-20200212


RUN set -x \
    && DEBIAN_FRONTEND=noninteractive \
    && rm /etc/apt/apt.conf.d/docker-clean \
    && apt-get update \
    && apt-get install -y --no-install-recommends \
        apt-transport-https \
        ca-certificates \
    && echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.0.list \
    && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
    && apt-get update

我尝试了 的各种解决方案,但没有成功。

提到的流程在几周前有效,现在失败了,知道如何解决吗?

今天重试解决了我的问题。

Here 是相应的 MongoDB 问题,同时已修复。