<?xml version="1.0" encoding="windows-1252"?>
<node id="1015753" title="Perl and paths...again :-(" created="2013-01-28 14:57:47" updated="2013-01-28 14:57:47">
<type id="115">
perlquestion</type>
<author id="1015750">
ricksquatch</author>
<data>
<field name="doctext">
&lt;P&gt;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.
&lt;p&gt;
&lt;code&gt;
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;
&lt;/code&gt;
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:
&lt;code&gt;
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.
&lt;/code&gt;&lt;p&gt;
I've been messing with this for a while now, so the paths may be a bit convoluted.
Any insights are worth beer....</field>
</data>
</node>
