最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

raspberry pi - docker error "exec usrbinmake: exec format error" when building for host linuxamd64 on differen

programmeradmin1浏览0评论

I am struggling to get a repo compiling with Docker. I have not made any changes to the source code yet and am just trying to build the master. But I am struggling to build it according to instructions in the repository: NickelMenu

According to instructions the source code is to be compiled with docker with:

docker run --volume="$PWD:$PWD" --user="$(id --user):$(id --group)" --workdir="$PWD" --env=HOME --entrypoint=make --rm -it ghcr.io/pgaskin/nickeltc:1.0 all koboroot

First I am getting a warning (and error) saying: WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested exec /usr/bin/make: exec format error

So I have searched around and found that I need to specify the platform if having different platform architecture on the host. I am trying to run this on a raspi (linux/arm64/v8 ?) but the host is linux/amd64 for image ghcr.io/pgaskin/nickeltc:1.0. So I have tried:

sudo DOCKER_DEFAULT_PLATFORM="linux/amd64" docker run --volume="$PWD:$PWD" --user="$(id --user):$(id --group)" --workdir="$PWD" --env=HOME --entrypoint=make --rm -it ghcr.io/pgaskin/nickeltc:1.0 all koboroot

The warning is now removed but I still get the error: exec /usr/bin/make: exec format error

I would appreciate if anyone could give me some directions since I am out of ideas. I am using Docker version 27.5.1, build 9f9e405

Thank you!

I am struggling to get a repo compiling with Docker. I have not made any changes to the source code yet and am just trying to build the master. But I am struggling to build it according to instructions in the repository: NickelMenu

According to instructions the source code is to be compiled with docker with:

docker run --volume="$PWD:$PWD" --user="$(id --user):$(id --group)" --workdir="$PWD" --env=HOME --entrypoint=make --rm -it ghcr.io/pgaskin/nickeltc:1.0 all koboroot

First I am getting a warning (and error) saying: WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested exec /usr/bin/make: exec format error

So I have searched around and found that I need to specify the platform if having different platform architecture on the host. I am trying to run this on a raspi (linux/arm64/v8 ?) but the host is linux/amd64 for image ghcr.io/pgaskin/nickeltc:1.0. So I have tried:

sudo DOCKER_DEFAULT_PLATFORM="linux/amd64" docker run --volume="$PWD:$PWD" --user="$(id --user):$(id --group)" --workdir="$PWD" --env=HOME --entrypoint=make --rm -it ghcr.io/pgaskin/nickeltc:1.0 all koboroot

The warning is now removed but I still get the error: exec /usr/bin/make: exec format error

I would appreciate if anyone could give me some directions since I am out of ideas. I am using Docker version 27.5.1, build 9f9e405

Thank you!

Share Improve this question asked yesterday Sverre KnutsenSverre Knutsen 131 bronze badge New contributor Sverre Knutsen is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
Add a comment  | 

1 Answer 1

Reset to default 0

The issue is that your hardware (where you run Docker) is based on ARM, while the Docker image that you're using is based on AMD64 (aka "Intel", aka "x86_64").

You will have to build your own image, which is explained here, but also note that "this cross-toolchain has only been tested on x86_64".

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论