in reply to DBD::Oracle error
... libclntsh.so.10.1: cannot open shared object file ...
Try setting LD_LIBRARY_PATH before starting the script. Or re-exec the program — something like this (at the beginning of the script):
BEGIN { my $prahome = "/u01/oracle/product/10.2.0/client_1"; my $oralib = "$orahome/lib"; unless ($ENV{LD_LIBRARY_PATH} =~ /\Q$oralib/) { # avoid endless l +oop $ENV{ORACLE_HOME} = $orahome; $ENV{LD_LIBRARY_PATH} = $oralib; $ENV{PATH} = "/bin:/usr/bin:$orahome/bin:/home/appowner/bin:." +; exec $0, @ARGV; } }
Some OSes / dynamic loaders cache the lib search paths upon exec, so setting them after starting the process has no effect.
|
|---|