[英]GPG invalid signature error while running apt update inside arm32v7/ubuntu:20.04 docker
I am trying to upgrade from ubuntu16 to ubuntu20 and for that I need to change image arm32v7/ubuntu:16.04
to arm32v7/ubuntu:20.04
in all our Dockerfiles [update required libraries after that], But while working on this task I found that there's some issue with arm32v7 base image of ubuntu:20.04 - when I run apt-get update
it fails with following error messages-我正在尝试从 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.
I tried the solution mentioned here [https://askubuntu.com/a/1264921/872700] but that too is not working as we are using the image in Dockerfile and its not allowed to pass --security-opt
in docker build
command.我尝试了这里提到的解决方案 [https://askubuntu.com/a/1264921/872700] 但这也不起作用,因为我们在 Dockerfile 中使用图像,并且不允许在--security-opt
docker build
命令中传递--security-opt
.
As a workaround I ran docker run
with --security-opt
option and created another image with docker commit
- then ran apt-get update
inside new image but that too is not working.作为一种解决方法,我使用--security-opt
选项docker run
--security-opt
docker run
并使用--security-opt
docker commit
创建另一个图像 - 然后在新图像中运行apt-get update
但这也不起作用。
FYI, The machine has following docker version on it- Docker version 19.03.13, build 4484c46
仅供参考,机器上有以下Docker version 19.03.13, build 4484c46
版本 - Docker version 19.03.13, build 4484c46
I had this issue on Docker Desktop for Mac recently, running apt-get update
in an Ubuntu 20.04 x86_64 container.我最近在 Docker Desktop for Mac 上遇到了这个问题,在 Ubuntu 20.04 x86_64 容器中运行apt-get update
。 It turned out the VM hosting the Docker images on macOS had run out of disk space.事实证明,在 macOS 上托管 Docker 映像的 VM 已用完磁盘空间。 That somehow manifested itself as apt
reporting invalid signatures on package index files.这以某种方式表现为apt
报告包索引文件上的无效签名。 Pruning unused images to free space solved the issue for me:修剪未使用的图像以释放空间为我解决了这个问题:
docker image prune -a docker image prune -a
As mentioned in comment by sema , if the issue is caused by insufficient disk space, another workaround is to increase the size of the virtual disk used by the virtual machine that is running docker.正如sema 评论中提到的,如果问题是由磁盘空间不足引起的,另一种解决方法是增加运行 docker 的虚拟机使用的虚拟磁盘的大小。 In Docker Desktop for Mac this can be done via Preferences > Resources > Disk image size
.在 Docker Desktop for Mac 中,这可以通过Preferences > Resources > Disk image size
来完成。
To solve the problem, I had to update the library libseccomp2
on my host pi machine as I could not find any other solution to apply inside the base image.为了解决这个问题,我不得不在我的主机 pi 机器上更新库libseccomp2
,因为我找不到任何其他解决方案来应用基本映像。
Downloaded the deb package from here and applied on host machine using -从这里下载 deb 包并使用 - 在主机上应用 -
sudo dpkg -i libseccomp2_2.4.4-1+b1_armhf.deb
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.