Saturday, May 18, 2024
 Popular · Latest · Hot · Upcoming
54
rated 0 times [  54] [ 0]  / answers: 1 / hits: 45695  / 2 Years ago, mon, october 17, 2022, 10:58:34

I am trying to build Raspberry Pi docker images but I am always having the same error, similar to this one, this one and this one.


While running the command apt update as root in a arm32v7/ubuntu:20.04 (or just ubuntu:latest), I get the following output:


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.

I have tried the suggested solutions of cleaning apt, cleaning docker and removing/recreating /var/lib/apt/lists without success. The SD card is 32G and the OS is a fresh install. df shows 26G free.


Some more information:



  • This is happening on a fresh install of 2020-05-27-raspios-buster-lite-armhf on a raspberry pi 4 B

  • The same error happens on another Raspberry Pi 4 B running HypriotOS

  • The same command in the same image works fine on a raspberry pi 3 B that has Arch linux installed

  • The error does not happen if I use an older version of ubuntu (ubuntu:18.04, 16.04, 14.04)


More From » 20.04

 Answers
0

The root cause of the problem is in libseccomp. The newer version fixes the problem, but it is not yet available in Debian's stable repos. There are two way to fix this problem:


Method 1


Start the container with --privileged. This bypasses docker's security measures, so it is not recommended. Or with --security-opt seccomp:unconfined as a little more secure.
docker run -it --security-opt seccomp:unconfined ubuntu:latest


Method 2


Upgrade libseccomp manually on the host system. Dowload version from unstable repos (I tested with 2.4.3-1) here.


Install the new version:


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


Note: The above methods solved the problems for systems based on Raspbian. The error was also happening on a Ubuntu 20.04 aarch64 system, for which @NeonLines' answer was able to help.


[#2929] Tuesday, October 18, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tonhorn

Total Points: 196
Total Questions: 118
Total Answers: 95

Location: Vanuatu
Member since Fri, May 13, 2022
2 Years ago
;