Hello all,
I'm trying to get an Oracle client working under Linux and I'm having
problems running a test script. Here's the error:
[EMAIL PROTECTED] lab $ perl oracle.pl
perl: symbol lookup error:
/s/oracle/perl5/lib/site_perl/5.8.6/i686-linux-64int/auto/DBD/Oracle/Oracle.so:
undefined symbol: OCINlsEnvironmentVariableGet
And here are details: I'm using Oracle's instantclient 10.2.0.3 and
stock DBD-Oracle 1.19 (except for I downloaded Makefile-instantclient.PL
and oracle-instantclient-config from
http://jeanchristophe.duber.free.fr/dbd_oracle_instantclient_linux/ and
changed paths in the config script as appropriate).
I used the .zip installers and changed some paths to fit better in our
infrastructure (e.g. the lib*.so files are in /s/oracle/lib and properly
symlinked).
I built using these commands:
perl Makefile-instantclient.PL PREFIX=/s/oracle/perl5
make
make install
It installed fine, but whenever I try to connect to a server, I get the
aforementioned error.
I have to muck with a few environment variables to connect via SQL*Plus,
specifically:
export ORACLE_HOME=/s/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export TWO_TASK=INFOACCESS.CS.WISC.EDU
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=$PATH:$ORACLE_HOME/bin
sqlplus # which works after my username and password
So, in the perl script, I do this:
------------
#!/s/std/bin/perl
use DBI;
use lib '/s/oracle/perl5/lib';
use lib '/s/oracle/perl5/lib/site_perl';
use strict;
$ENV{ORACLE_HOME} ||= "/s/oracle";
$ENV{TWO_TASK} ||= "INFOACCESS.CS.WISC.EDU";
$ENV{LD_LIBRARY_PATH} ||= "$ENV{ORACLE_HOME}/lib";
$ENV{TNS_ADMIN} ||= "$ENV{ORACLE_HOME}/network/admin";
my $dbh = DBI->connect("dbi:Oracle:", [user], [password])
|| die "Couldn't connect to Oracle: $!";
#
# more stuff here that never executes
------------
The code after the connect attempt never executes because the script
exits after said failure.
I think that's all the details I can provide for now. Any ideas? Thanks
much.
Peter