not a dynamic executable

I sometimes have issues running a 32bit program under Linux X64.

When you run ldd it reports that it’s not a dynamic executable

# ldd /usr/bin/snx
not a dynamic executable

However if you run file, you do see that it is.

# file /usr/bin/snx
/usr/bin/snx: setuid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, stripped

You can confirm that you are running 64 bit Linux

# uname -i
x86_64

To fix this you need to install 32 bit libraries. On Fedora you can install them using

dnf install /lib/ld-linux.so.2 libX11.so.6 libpam.so.0 libstdc++.so.5

And on Debian

apt-get update
apt-get install lib32z1 lib32ncurses5 libstdc++5:i386

Worked for me.

This entry was posted in General. Bookmark the permalink.

1 Response to not a dynamic executable

  1. sharad singh says:

    since i am working inside a docker container. i have a 32-bit executable called cmpclient. i have all the related libraries in required path of container which are needed by cmpclient executable and all the libraries are of 32-bit. Even having all the necessary libraries, it says not a dynamic executable.
    when i run the same 32-bit executable on host with ldd cmpclient, it works fine there.
    Even i tried to copy the same libraries with docker cp command from host to docker container, then also it gives the same error : not a dynamic executable.

Leave a Reply

Your email address will not be published. Required fields are marked *