I'm using 32-bit Linux. I believe I tried something like this before and
it just wouldn't work (it didn't seem to like the instantclient) so I
looked around for alternative compilation methods.
I'll try this again with the stock Makefile.PL. Thanks. *fingers crossed*
Peter
John Scoles wrote:
Are you using a 64 bit Linux??
Though the instructions are ok at the link I do not think that makefile
will work. I would stick with the Makefile.PL that comes with 1.19 as
it compiles fine against 32 bit Linux. Just read the readmes and make
sure you set the
export ORACLE_HOME=/s/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
before you do the compile
cheers John Scoles
Peter Koczan wrote:
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