I use a Linux executable, the libraries are located in many place. I mean the same library with different version. The problem is the executable picks up the executable in wrong library. The OS is Ubuntu 64 bit.
The libraries are located /usr/local/lib and /usr/lib/x86_64-linux-gnu. I would like that it would use /usr/local/lib version.
To force it to use the /usr/local/lib version. I copied the .so from there to /usr/lib/x86_64-linux-gnu and deleted .so referenced there. The result was that the software (VLC) did not use the newly copied libraries but it stopped working properly and it did not find the library at all. Despite of the fact, it was over there. So it is not clear how VLC decides what library to use.
It is clear that it uses the files under /etc/ld.so.conf.d to get the library paths. (Files contain /usr/local/lib and /usr/lib/x86_64-linux-gnu) WHy does not it choose the library I copied under /usr/lib/x86_64-linux-gnu or under /usr/local/lib ?
LD_LIBRARY_PATH is not set.
Update:
I thought I could just add another version , the program would use that but it seems that the version of the library is set at compile time for the given executable. so it will not use the new version, just because I delete an old one.