I have a shared object file libfault.so for my 32 bit compiled application on RHEL 6.4. I want to preload this file while starting my application. I have placed it in /usr/local/lib/ directory.

But while starting the application, i am getting the following error.

ERROR: ld.so: object 'libfault.so' from LD_PRELOAD cannot be preloaded: ignored.

But, if i compile libfault.so in 64 bit and place in /usr/local/lib64/, I do not get the error. But the file is not doing its intended function since my application is 32 bit compiled.


You can use the environment variable $LD_LIBRARY_PATH to override the dynamic loader's search path when looking for libraries to load.

To do it temporarily for a single application, you can invoke it like so:

$ LD_LIBRARY_PATH=/usr/local/lib <your executable here>

You can make the change more permanent for your shell instance by exporting that variable:

$ export LD_LIBRARY_PATH=/usr/local/lib

Adjust the paths above as needed for where ever your 32-bit .so is being stored.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.