Nishant
Nishant

Reputation: 21914

Linker not showing the customized library path

The problem is I have Aspell.so and it is using system libs - but I need to over-ride using $LD_LIBRARY_PATH , but changing this variable helped in one system but not another ! oes $LD_LIBRARY_PATH decide the ldd directory or is there anything that overrides it ? I set it to me local directory , but still ldd is taking the libraries from the syste /usr/lib directory .

Its like my local machine is a 32bit . I compile it here and port it to a test server which is 64 bit Centos4.8 ( works fine ) .... and also copy to production which is 64bit ( doesnt work fine ) Redhat 4.8

I do export $LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mydir ...and just try ldd aspell.so

Upvotes: 2

Views: 79

Answers (1)

You're appending to the LD_LIBRARY_PATH. The path specifies not just where to search, but when to search, so you should put /mydir at the start if you want it to take priority over other entires.

If you want to force it to use your aspell.so instead you can use LD_PRELOAD=/mydir/aspell.so instead.

Upvotes: 1

Related Questions