debootstrap --second-stage with fakechroot fails on docker (/lib/ld-linux-armhf.so.3: No such file or directory)
1
vote
1
answer
635
views
I am trying to set up a foreign chroot in a docker container. Excerpt from the script:
apt-get -y install debootstrap fakechroot fakeroot qemu-user-static binfmt-support
mkdir -p $CROSS_ROOT
fakechroot fakeroot -s .fakeroot.state debootstrap --variant=fakechroot --include=fakeroot,build-essential,ca-certificates,debian-archive-keyring,git,sudo --arch=${CROSS_ARCH} --foreign ${CROSS_RELEASE} $CROSS_ROOT $CROSS_MIRROR
mkdir -p $CROSS_ROOT/usr/bin
ln /usr/bin/qemu-*-static $CROSS_ROOT/usr/bin/
fakechroot fakeroot -i .fakeroot.state -s .fakeroot.state chroot $CROSS_ROOT /debootstrap/debootstrap --second-stage
For Debian buster/armhf, the last line fails with the following error message:
/lib/ld-linux-armhf.so.3: No such file or directory
However, when I insert
ls -la $CROSS_ROOT/lib/ld-linux-*
before the last line, the library file is found:
lrwxrwxrwx 1 root root 30 Mar 15 2022 /opt/chroot/armhf/lib/ld-linux-armhf.so.3 -> arm-linux-gnueabihf/ld-2.28.so
The link target also exists:
-rwxr-xr-x 1 root root 105840 Mar 15 2022 /opt/chroot/armhf/lib/arm-linux-gnueabihf/ld-2.28.so
So the library is definitely where it should be. What is wrong here, and what can I do about it?
Asked by user149408
(1515 rep)
Apr 6, 2023, 08:08 PM
Last activity: Apr 9, 2023, 10:44 AM
Last activity: Apr 9, 2023, 10:44 AM