AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1263284
Accepted
TSpark
TSpark
Asked: 2020-07-31 05:25:30 +0800 CST2020-07-31 05:25:30 +0800 CST 2020-07-31 05:25:30 +0800 CST

apt update 在 arm 上的 Ubuntu 20.04 容器中引发签名错误

  • 772

我正在尝试构建 Raspberry Pi docker 映像,但我总是遇到相同的错误,类似于this、this和this。

在 a (或只是)apt update中以 root 身份运行命令时,我得到以下输出:arm32v7/ubuntu:20.04ubuntu:latest

root@273d63597ce6:/# apt update
Get:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease [265 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [111 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [98.3 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [107 kB]
Err:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
  At least one invalid signature was encountered.
Err:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
  At least one invalid signature was encountered.
Err:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
  At least one invalid signature was encountered.
Err:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
  At least one invalid signature was encountered.
Reading package lists... Done
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal InRelease' 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.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease' 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.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease' 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.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-security InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-security InRelease' 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.

我已经尝试了清理 apt、清理 docker 和删除/重新创建的建议解决方案,但均未/var/lib/apt/lists成功。SD 卡为 32G,操作系统为全新安装。df显示26G免费。

更多信息:

  • 这是在树莓派 4 B 上全新安装 2020-05-27-raspios-buster-lite-armhf 时发生的
  • 同样的错误发生在另一个运行 HypriotOS 的 Raspberry Pi 4 B 上
  • 相同图像中的相同命令在安装了 Arch linux 的树莓派 3 B 上运行良好
  • ubuntu:18.04如果我使用旧版本的 ubuntu ( , 16.04, 14.04) ,则不会发生该错误
gnupg arm docker raspberrypi 20.04
  • 4 4 个回答
  • 36400 Views

4 个回答

  • Voted
  1. Best Answer
    TSpark
    2020-08-06T18:23:14+08:002020-08-06T18:23:14+08:00

    问题的根本原因在于 libseccomp。较新的版本解决了这个问题,但它尚未在 Debian 的稳定存储库中可用。有两种方法可以解决此问题:

    方法一

    使用 启动容器--privileged。这绕过了docker的安全措施,所以不推荐。或者--security-opt seccomp:unconfined更安全一点。 docker run -it --security-opt seccomp:unconfined ubuntu:latest

    方法二

    在主机系统上手动升级 libseccomp。从不稳定的仓库下载版本(我用 2.4.3-1 测试过)here。

    安装新版本:

    sudo dpkg -i libseccomp2_2.4.3-1+b1_armhf.deb

    注意:上述方法解决了基于 Raspbian 系统的问题。该错误也发生在 Ubuntu 20.04 aarch64 系统上,@NeonLines 的回答能够提供帮助。

    • 51
  2. kenorb
    2021-06-10T15:40:04+08:002021-06-10T15:40:04+08:00

    遇到至少一个无效签名

    该错误表明其中一个文件/var/lib/apt/lists至少包含一个无效/损坏的签名(可能是apt-key误用或其他原因的结果)。

    尝试使用调试消息运行 Apt update:

    apt-get -oDebug::pkgAcquire::Worker=1 update
    

    这应该将您指向损坏的文件,例如

    0% [工作] <- gpgv:400%20URI%20Failure%0aMessage:%20At%20least%20one%20invalid%20signature%20was%20encountered.%0aURI:%20gpgv:/var/lib/apt/lists/partial/CorruptedFile_InRelease

    编辑文件,查找并删除损坏的部分,或删除整个文件,以便重新创建它。

    • 2
  3. ManuelSchneid3r
    2020-11-21T07:51:06+08:002020-11-21T07:51:06+08:00

    TSpark、HyperCreeks 和 ibster1st123s 的答案在 Rasbian 10 和来自官方存储库的最新 docker 版本上对我有用。正如 NeonLines 指出的那样,您必须安装最新版本,因为他们不会遇到这个问题。

    大多数用户设置 Docker 的存储库并从中安装,以便于安装和升级任务。这是推荐的方法,除了 Raspbian。[…] 对于 Raspbian,尚不支持使用存储库进行安装。您必须改为使用便捷脚本。– docs.docker.com

    tl;博士

    使用便捷脚本获取最新的 docker 版本。您应该检查上面的链接,但有一些警告。

    curl -fsSL https://get.docker.com -o get-docker.sh
    sudo sh get-docker.sh
    
    • 1
  4. NeonLines
    2020-08-06T13:38:09+08:002020-08-06T13:38:09+08:00

    升级到 docker 版本 19.03.12 为我解决了这个问题。

    • 0

相关问题

  • keyserver.ubuntu.com 宕机时怎么办?

  • 在哪里可以找到预编译的 gcc 3.4.6 或 2.95 ARM 交叉编译器?[关闭]

  • 在 Kmail 中配置 GPG

  • 备份软件源

  • 解决 apt-get BADSIG GPG 错误的最简单方法是什么?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve