簡體   English   中英

在 arm32v7/ubuntu:20.04 docker 中運行 apt update 時 GPG 無效簽名錯誤

[英]GPG invalid signature error while running apt update inside arm32v7/ubuntu:20.04 docker

我正在嘗試從 ubuntu16 升級到 ubuntu20,為此我需要將所有arm32v7/ubuntu:16.04圖像arm32v7/ubuntu:16.04更改為arm32v7/ubuntu:20.04 [之后更新所需的庫],但是在執行此任務時,我發現有ubuntu:20.04 的 arm32v7 基本映像的一些問題 - 當我運行apt-get update它失敗並顯示以下錯誤消息 -

Err:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
  At least one invalid signature was encountered.
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [107 kB]
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.

我嘗試了這里提到的解決方案 [https://askubuntu.com/a/1264921/872700] 但這也不起作用,因為我們在 Dockerfile 中使用圖像,並且不允許在--security-opt docker build命令中傳遞--security-opt .

作為一種解決方法,我使用--security-opt選項docker run --security-opt docker run並使用--security-opt docker commit創建另一個圖像 - 然后在新圖像中運行apt-get update但這也不起作用。

僅供參考,機器上有以下Docker version 19.03.13, build 4484c46版本 - Docker version 19.03.13, build 4484c46

我最近在 Docker Desktop for Mac 上遇到了這個問題,在 Ubuntu 20.04 x86_64 容器中運行apt-get update 事實證明,在 macOS 上托管 Docker 映像的 VM 已用完磁盤空間。 這以某種方式表現為apt報告包索引文件上的無效簽名。 修剪未使用的圖像以釋放空間為我解決了這個問題:

docker image prune -a

正如sema 評論中提到的,如果問題是由磁盤空間不足引起的,另一種解決方法是增加運行 docker 的虛擬機使用的虛擬磁盤的大小。 在 Docker Desktop for Mac 中,這可以通過Preferences > Resources > Disk image size來完成。

為了解決這個問題,我不得不在我的主機 pi 機器上更新庫libseccomp2 ,因為我找不到任何其他解決方案來應用基本映像。

這里下載 deb 包並使用 - 在主機上應用 -

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM