in reply to LD_LIBRARY_PATH setting

When i need a path for my script i just included in the @INC, ie.
BEGIN { # ... unshift @INC, '/usr/local/gsl-1/lib'; # .. }

Replies are listed 'Best First'.
Re^2: LD_LIBRARY_PATH setting
by Corion (Patriarch) on Aug 06, 2016 at 12:37 UTC

    $ENV{LD_LIBRARY_PATH} is where unixish/linuxish systems go looking for system libraries. This comes into play when Perl libraries need to load system libraries. @INC is where Perl goes looking for Perl modules/Perl libraries.

      Worth adding that it should be possible to compile the related perl .so modules with a path to their dependencies, if necessary. The CC option -Wl,--rpath=/path/to/libs is passed to linker; resulting shared objects ought to load without custom LD_LIBRARY_PATH. So it's a matter of properly done module install.