Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 223
Abhisit Sangjan Avatar asked Dec 13 '17 07:12

Abhisit Sangjan


2 Answers

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

like image 163
Wajih Avatar answered Sep 28 '22 07:09

Wajih


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
like image 27
Emi Montoro Avatar answered Sep 28 '22 07:09

Emi Montoro