Error when I try to run an executable file while loading libz.so.1 library in linux debian

Viewed 85

I can't run the executable file because of the libz.so.1 library.

I have the libz.so.1 file in file path /usr/lib/x86-64-linux-gnu/libz.so.1, but the error appears. How can I do to solve this? This is the output of the terminal.

aruvi@iris:Desktop/Final_iRTC_witout_ACM_model$ ./main_iRTC_init

./main_iRTC_init: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

The executable file was compiled for 32 bit environment but now the platform is changed to the 64 bit version. please suggest and guide me to solve the problem.

1 Answers

If your application is compiled for i386 (aka x86, or ia32), then all it's dylib dependencies must be i386 as well (or more generally: all dylib dependencies must be satisfied by the same architecture).

You can install (and run) i386 binaries/packages/dependencies on your Debian system by enabling multiarch:

dpkg --add-architecture i386
apt-get update
apt-get install zlib1g:i386
Related