u-boot /lib/ld-linux-armhf.so.3: No such file or directory
Asked Answered
A

2

9

My machine Ubuntu 16.04.3 LTS x86_64. I do compile u-boot-2017.11 and I got the error.

u-boot-2017.11$ export ARCH=arm

u-boot-2017.11$ export CROSS_COMPILE=/opt/toolchains/gcc-linaro-4.9.4-2017.01-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-

u-boot-2017.11$ make geekbox_defconfig
  HOSTCC  scripts/basic/fixdep
/lib/ld-linux-armhf.so.3: No such file or directory
scripts/Makefile.host:99: recipe for target 'scripts/basic/fixdep' failed
make[1]: *** [scripts/basic/fixdep] Error 255
Makefile:399: recipe for target 'scripts_basic' failed
make: *** [scripts_basic] Error 2

I try to find and install missing package, but it is all ready installed.

u-boot-2017.11$ dpkg -S ld-linux-armhf.so
libc6-armhf-cross: /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3

u-boot-2017.11$ sudo apt-get install libc6-armhf-cross
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libc6-armhf-cross is already the newest version (2.23-0ubuntu3cross1).
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.

How do I fix it? Please.

Anthropocentric answered 13/12, 2017 at 7:22 Comment(0)
P
8

after installing libc6-armhf-cross

sudo ln -s /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 /usr/lib/ld-linux-armhf.so.3 or update the library path

Prehistoric answered 16/10, 2018 at 9:44 Comment(0)
T
4

The problem is that you don’t have the libraries of arm, a quick and useful solution will be compiling with -static. For example:

$ arm-linux-gnueabihf-gcc -static -o name program.s
$ qemu-arm name
Thurifer answered 10/12, 2020 at 15:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.