Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unknown error executing apt-key" on Apple Silicon #109

Open
jrc opened this issue Apr 21, 2021 · 4 comments
Open

"Unknown error executing apt-key" on Apple Silicon #109

jrc opened this issue Apr 21, 2021 · 4 comments

Comments

@jrc
Copy link

jrc commented Apr 21, 2021

Steps to reproduce:

On a Apple Silicon machine:

  1. Create a Dockerfile that contains the following:
FROM balenalib/rpi-raspbian
RUN apt-get update -y
  1. Build it:

docker build .

Expected: No errors

Actual: Fails due to

#5 2.888 E: The repository 'http://archive.raspberrypi.org/debian buster InRelease' is not signed.
#5 2.888 W: GPG error: http://archive.raspbian.org/raspbian buster InRelease: Unknown error executing apt-key
#5 2.888 E: The repository 'http://archive.raspbian.org/raspbian buster InRelease' is not signed.
------
executor failed running [/bin/sh -c apt-get update -y]: exit code: 100

Configurations:

balenalib/raspberry-pi on Intel WORKS
balenalib/raspberry-pi on Apple Silicon FAILS
balenalib/raspberrypi3 on Apple Silicon WORKS

On Apple Silicon, latest Big Sur and Docker are used:

Docker version 20.10.5, build 55c4c88
% sw_vers
ProductName:	macOS
ProductVersion:	11.2.3
BuildVersion:	20D91

Additional debugging:

% docker run -ti --platform linux/arm/v6 balenalib/rpi-raspbian:latest
root@627909b18b76:/# apt-get update -y
Get:1 http://archive.raspberrypi.org/debian buster InRelease [32.9 kB]
Get:2 http://archive.raspbian.org/raspbian buster InRelease [15.0 kB]   
Err:1 http://archive.raspberrypi.org/debian buster InRelease
  Unknown error executing apt-key
Err:2 http://archive.raspbian.org/raspbian buster InRelease
  Unknown error executing apt-key
Reading package lists... Done
W: GPG error: http://archive.raspberrypi.org/debian buster InRelease: Unknown error executing apt-key
E: The repository 'http://archive.raspberrypi.org/debian buster 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://archive.raspbian.org/raspbian buster InRelease: Unknown error executing apt-key
E: The repository 'http://archive.raspbian.org/raspbian buster 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.
root@627909b18b76:/# apt-key exportall
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
Illegal instruction
@jrc
Copy link
Author

jrc commented May 28, 2021

Update: still happening with

% docker -v
Docker version 20.10.6, build 370c289
% sw_vers
ProductName:	macOS
ProductVersion:	11.4
BuildVersion:	20F71

@jrc
Copy link
Author

jrc commented May 28, 2021

Workaround: build using local mode, see https://forums.balena.io/t/unknown-error-executing-apt-key-on-apple-silicon/322093

@jrc
Copy link
Author

jrc commented Aug 22, 2022

Update (after a year): This is still an issue.

Also, the above workaround of using local mode is unbearably slow with RPi Zero devices, so it's not really an option.

% docker -v
Docker version 20.10.17, build 100c701
% sw_vers
ProductName:	macOS
ProductVersion:	12.4
BuildVersion:	21F79

@jrc
Copy link
Author

jrc commented Aug 22, 2022

Relating docker/for-mac#5251 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant