ldd started to show me “not a dynamic executable”

I am a bit confused because I don't understand why it happens:
The last changes on the system that I remember were

  • installed g++5 for the old porject (removed already)
  • apt autoclean
  • removed ldconfig cache (guess this is the reason)

Now I can't launch some of the applications. Ldd tells me that it's “not a dynamic executable”

igor@Linbox:/lib/i386-linux-gnu$ ldd libssl.so.1.0.0 is not a dynamic executable
igor@Linbox:/lib/i386-linux-gnu$ ldd libselinux.so.1 is not a dynamic executable
igor@Linbox:/bin$ ldd dd linux-vdso.so.1 => (0x00007fff0b380000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb618c76000) /lib64/ld-linux-x86-64.so.2 (0x00007fb619269000)
igor@Linbox:/lib/x86_64-linux-gnu$ ldd libc.so.6 /lib64/ld-linux-x86-64.so.2 (0x00007fcb44373000) linux-vdso.so.1 => (0x00007ffed8f33000)

Version: Linux Linbox 4.13.0-46-generic #51-Ubuntu SMP Tue Jun 12 12:36:29 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Also I checked that it is still present:

// for running x32 applications on x64 system
sudo dpkg --add-architecture i386
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

Since removed ld.so.cache I did sudo ldconfig. There is new cache in /etc/ld.so.cache

Do I miss some library?

Added file checks:

file /lib/i386-linux-gnu/libssl.so.1.0.0
/lib/i386-linux-gnu/libssl.so.1.0.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=c1e3854cb8b86f1006dc391d23f102ea1184cf25, stripped
file /lib/i386-linux-gnu/libselinux.so.1
/lib/i386-linux-gnu/libselinux.so.1: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=396cda857e41036061599a59c9f5fe62d7b50c4d, stripped
dpkg -S /lib/i386-linux-gnu/libssl.so.1.0.0
libssl1.0.0:i386: /lib/i386-linux-gnu/libssl.so.1.0.0
dpkg -S /lib/i386-linux-gnu/libselinux.so.1
libselinux1:i386: /lib/i386-linux-gnu/libselinux.so.1

Checked libx32 from comments:

igor@Linbox:/lib/i386-linux-gnu$ ls -l /libx32/ld*
-rwxr-xr-x 1 root root 155092 Jan 12 2018 /libx32/ld-2.26.so
lrwxrwxrwx 1 root root 10 Jan 12 2018 /libx32/ld-linux-x32.so.2 -> ld-2.26.so
5

3 Answers

Bug 1616609, ldd reports incorrectly "not a dynamic executable" when the executable's loader is not present , is probably the cause of the problem (as steeldriver suggested). Reinstall the libc6-x32 package to get it back. Do consider adding yourself to the bug, maybe it'll be fixed one day -- a patch is even suggested.

1

So this worked for me. ldd is a script. Near the top (line 29 on my arm Debian 10) it bases all the library searching on RTLDLIST=/lib/ld-linux-aarch64.so.1. After installing arm 32 bit libraries (dpkg --add-architecture armhf; apt update; etc), I took a look in /lib and saw ld-linux-armhf.so.3 right next to ld-linux-aarch64.so.1. So then this stopped ldd saying "not a dynamic executable":

  1. copy /usr/bin/ldd to /usr/bin/ldd32
  2. edit /usr/bin/ldd32
  3. replace RTLDLIST=/lib/ld-linux-aarch64.so.1 with RTLDLIST=/lib/ld-linux-armhf.so.3
  4. ldd32 <32 bit binary>

I've solved the problem (thx to ubfan1) by updating kernel from 4.13.0-46-generic up to 4.15.0-39-generic:

$ uname -a
Linux Linbox 4.15.0-39-generic #42-Ubuntu SMP Tue Oct 23 15:48:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
/lib/i386-linux-gnu$ ldd libselinux.so.1 linux-gate.so.1 (0xf7fca000) libpcre.so.3 => /lib/i386-linux-gnu/libpcre.so.3 (0xf7ee6000) libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7ee1000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7d05000) /lib/ld-linux.so.2 (0xf7fcc000) libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7ce6000)

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like