A workaround for LD_LIBRARY_PATH for me is to locate my Java jvm.dll in $JRE_BIN/bin/server and the resource dlls are in $JRE_HOME/bin the other libraries are on $PATH
Martin Gainty Nimziki:Rabbi i'm not jewish.. Rabbi Levison: ..Nobody's Perfect.. (excerpt from movie "Independence Day") ______________________________________________ Note de déni et de confidentialité Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > From: shlo...@iglu.org.il > To: beginn...@perl.org > Subject: Re: How to set LD_LIBRARY_PATH > Date: Fri, 28 May 2010 11:06:41 +0300 > CC: newbie01.p...@gmail.com; dbi-users@perl.org > > On Friday 28 May 2010 10:45:14 newbie01 perl wrote: > > Hi all, > > > > Can someone advise how to set LD_LIBRARY_PATH from within the Perl scripts? > > > > If I set LD_LIBRARY_PATH from the command line, all is okay > > > > [oracle ~]$ perl -e 'use DBD::Oracle; print $DBD::Oracle::VERSION,"\n";' > > Can't load > > '/oracle/product/db/11.1/perl/lib/site_perl/5.8.3/x86_64-linux-thread-multi > > /auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.11.1: > > cannot open shared object file: No such file or directory at > > /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/DynaLoader.pm line 230. > > at -e line 1 > > Compilation failed in require at -e line 1. > > BEGIN failed--compilation aborted at -e line 1. > > [oracle ~]$ export LD_LIBRARY_PATH=/oracle/product/db/11.1/lib > > [oracle ~]$ perl -e 'use DBD::Oracle; print $DBD::Oracle::VERSION,"\n";' > > 1.15 > > > > But if I do the following instead in the Perl script, it does not work? How > > to set the LD_LIBRARY_PATH then? > > > > $ENV{ORACLE_HOME}=$ORACLE_HOME; > > $ENV{ORACLE_SID}=$ORACLE_SID; > > $ENV{PATH}="$ORACLE_HOME/bin:$PATH"; > > $ENV{LD_LIBRARY_PATH}="$ORACLE_HOME/lib"; > > > > FYI, the script is to run from a cron which is why am setting > > LD_LIBRARY_PATH in the script. > > > > If you're going to use "use DBD::Oracle;" in the script then you'll need to > put these statements in a BEGIN block: > > [code] > use vars qw($ORACLE_HOME $ORACLE_SID); > > BEGIN > { > $ORACLE_HOME = ...; > $ORACLE_SID = ...; > $ENV{ORACLE_HOME}=$ORACLE_HOME; > $ENV{ORACLE_SID}=$ORACLE_SID; > $ENV{PATH}="$ORACLE_HOME/bin:$PATH"; > $ENV{LD_LIBRARY_PATH}="$ORACLE_HOME/lib"; > } > > use DBD::Oracle; > [/code] > > That's because "use" is executed at compile-time instead of run-time. > > Regards, > > Shlomi Fish > > -- > ----------------------------------------------------------------- > Shlomi Fish http://www.shlomifish.org/ > "The Human Hacking Field Guide" - http://shlom.in/hhfg > > God considered inflicting XSLT as the tenth plague of Egypt, but then > decided against it because he thought it would be too evil. > > Please reply to list if it's a mailing list post - http://shlom.in/reply . _________________________________________________________________ The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5