perlquestion
ricksquatch
<P>I've done the SuperSearch, and the reg'lar Google thing, but nothing hss clicked,as of yet. I'm hoping this will get the ball rolling, so to speak.
<p>
<code>
BEGIN {
$ENV{ORACLE_HOME}="/export/home/riedward/oraclient";
$ENV{TNS_ADMIN}="/export/home/riedward/oraclient";
$ENV{NLS_LANG}="";
$ENV{LD_LIBRARY_PATH}="/lib:/usr/lib:/export/home/riedward/oraclient/sdk:/export/home/riedward/oraclient";
$ENV{PATH}="/usr/bin:/usr/sbin:/usr/lib:/export/home/riedward/oraclient";
$ENV{PERL_LOCAL_LIB_ROOT}="/export/home/riedward/perl5";
$ENV{PERL_MB_OPT}="--install_base /export/home/riedward/perl5";
$ENV{PERL_MM_OPT}="INSTALL_BASE=/export/home/riedward/perl5";
$ENV{PERL5LIB}="/export/home/riedward/perlmodules:/export/home/riedward/perl5/lib/perl5/sun4-solaris-64int:/export/home/riedward/perl5/lib/perl5";
}
use DBI;
use DBD::Oracle;
</code>
If I set each of the listed env vars in my .profile, all is well. If I don't, and only set them in my script, then I get the dreaded DBD::Oracle error:
<code>
Can't load '/export/home/riedward/perlmodules/sun4-solaris-64int/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: ld.so.1: perl: fatal: libclntsh.so.10.1: open failed: No such file or directory at /usr/perl5/5.8.4/lib/sun4-solaris-64int/DynaLoader.pm line 230.
</code><p>
I've been messing with this for a while now, so the paths may be a bit convoluted.
Any insights are worth beer....