当在我的主机(arm64v8) (amd64)上运行一个码头容器(amd64)并试图在debian容器上安装/配置libc时,它会给出以下错误:
[ cut for size, full log at https://pastebin.com/7ZtvqZsD ]
#6 18.65 Setting up libc-bin (2.31-13+deb11u3) ...
#6 18.92 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#6 19.03 Segmentation fault (core dumped)
#6 19.06 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#6 19.15 Segmentation fault (core dumped)
#6 19.15 dpkg: error processing package libc-bin (--configure):
#6 19.15 installed libc-bin package post-installation script subprocess returned error exit status 139
#6 19.20 Errors were encountered while processing:
#6 19.20 libc-bin
#6 19.31 E: Sub-process /usr/bin/dpkg returned an error code (1)
------
executor failed running [/bin/sh -c apt-get -y reinstall libc-bin]: exit code: 100最小可重现性示例
FROM arm64v8/debian
RUN apt-get -y update
RUN apt-get -y reinstall libc-bin版本
$ qemu-system-aarch64 --version # installed via pacman -S qemu-full
QEMU emulator version 7.0.0
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developer
$ qemu-system-arm --version # installed via pacman -S qemu-full
QEMU emulator version 7.0.0
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developer
$ docker --version
Docker version 20.10.17, build 100c70180f
## Binfmt extensions installed with
docker run --privileged --rm tonistiigi/binfmt --install all &
$ uname -a
Linux <hostname> 5.18.7-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Sat, 25 Jun 2022 20:22:03 +0000 x86_64 GNU/Linux
## OS
Arch linux先读
(也称为请不要把我的问题标记为这些问题的副本,这与它们不同)
qemu: uncaught target signal 11 (Segmentation fault) - core dumped in docker containers
这些答案对我来说都不管用,我正在运行answers中最新的qemu,据我所知,arm64v8/debian不是一个不推荐的容器映像,我也没有使用docker。另外,这个问题的方向正好相反(amd64容器在arm64上)。
qemu: uncaught target signal 11 (Segmentation fault)
问题并不来源于git,所以这个问题的答案是没有帮助的。
qemu-arm qemu: uncaught target signal 11 (Segmentation fault) - core dumped
也没有帮助,我尝试使用qemu-用户静态v7.0.0 (编译和-bin),这也没有解决我的问题。不确定TCG解释器是什么,所以这可能是问题所在,但我不太熟悉qemu,不知道如何“禁用TCG解释器”。
qemu uncaught target signal 11 segmentation fault -- only on arm64 build
我的内核是5.18.7-zen1-1-zen,这比答案显示的5.10.0-8更新了,也是在撰写本文时arch linux repos上提供的最新版本。
qemu: uncaught target signal 11 (Segmentation fault) - core dumped, when trying to return a struct
所有答案都与C有关,我不使用。
目标
我的最终目标是使用multistrap构建一个根文件系统,最终将其放到arm64设备上,但是这个问题阻碍了我做任何事情,因为运行dpkg --configure -a是必须从一开始就必须运行的步骤之一。
发布于 2022-07-08 05:08:50
在我的头撞在这堵墙上几个星期之后,我发现的解决办法是:
FROM arm64v8/debian:11
FROM debian:11而不是在码头容器中安装apt install qemu-user-static
qemu-user-static well)
qemu-aarch64-static复制到rootfs cp $(which qemu-aarch64-static) /rootfs_location/usr/bin/qemu-aarch64 (注意文件名更改为)chroot /rootfs_location/
我不清楚为什么会这样,但这很可能是因为debian和qemu-用户静态二进制文件之间的不兼容,这些二进制文件是为arch编译的(或任何碰巧使用的OSes ),但我对此并不完全确定。
https://stackoverflow.com/questions/72778600
复制相似问题