0

On Linux OS I have an executable execA which has a dynamic library dependency on libB.so, and that library has a dynamic library dependency on libC.so. The trouble is, on one machine these dependencies work out perfectly fine, but on another machine there is a problem with dependency between libB.so and libC.so (libC.so cannot be found).

Where should I start looking first to resolve this dependency issue?

P.S. An outline of how the dynamic library searches are done would be wonderful.

IDDQD
  • 3,543
  • 8
  • 29
  • 40
  • Where are all the files located? Does `libC.so` exist in the search path? – Matt Jan 11 '18 at 17:48
  • @Matt What is the 'search' path? – IDDQD Jan 11 '18 at 17:51
  • Look at `$PATH` and `$LD_LIBRARY_PATH`. This may be a related question https://stackoverflow.com/questions/13428910/how-to-set-the-environmental-variable-ld-library-path-in-linux – Matt Jan 11 '18 at 17:58
  • 2
    set environnment variable LD_DEBUG before launching execA. LD_DEBUG=libs ./execA – Oliv Jan 11 '18 at 18:11
  • Use `ldd` to check out the dependencies, i.e. `ldd libB.so`. Do this first on the machine where it works, and compare to the output on the machine where it does not work. – Markku K. Jan 11 '18 at 20:52

0 Answers0