Skip to content

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

@jrc

Description

@jrc

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions