4

For a dependency identified by ldd, how do I know whether it used the binary's RPATH or the environment's LD_LIBRARY_PATH ?

MartinCz
  • 528
  • 4
  • 13

1 Answers1

5

how do I know whether it used the binary's RPATH or the environment's LD_LIBRARY_PATH ?

Assuming Linux, run like so:

env LD_DEBUG=files,libs /path/to/executable

The output will tell you all you want to know: what the loader search path is when looking for various libraries, and why.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362