[Solved] DBD::Oracle 1.46 can't find library
From: Stephen \ Wales (Stephen.Wales_at_riotinto.com)
Date: Tue, 15 Feb 2005 11:38:36 -0700 To: <email@example.com>
Posting this just for the record, in case anyone else has the same
problem as I had and can find the solution via a web search...
Eventually, I recompiled perl with the newest DBI (1.47) and DBD::Oracle
I noticed that I was having problems if I did testing without
LD_LIBRARY_PATH set (I use HP, others may use other Unix versions and
may need SHLIB_PATH). It was having trouble loading libwtc9.sl, which
must be somehow involved in calling the DBD::Oracle functions. Once
LD_LIBRARY_PATH was defined, then we had everything working. Next
problem was how to make that environment variable visible to apache.
I entered the following into my httpd.conf in /opt/hpapache2/conf
SetEnv LD_LIBRARY_PATH /oracle/product/18.104.22.168/lib
And now I hav a working perl with Oracle support.
> From: Wales, Stephen (RTSI)
> Sent: Wednesday, February 02, 2005 10:37 AM
> To: 'firstname.lastname@example.org'
> Subject: DBD::Oracle 1.46 can't find library
> I had been happily plodding along on oracletool 2.0 for that last 2
> years (a perl cgi script that interrogates Oracle databases), when I
> discovered that there was a new version.
> So I downloaded and installed that and found that it didn't work, that
> something that had been added, ora_session_modes in DBD::Oracle
> required version 1.13 or greater of DBD::Oracle (I had 1.12).
> After spending a day and a half working out how to get DBD::Oracle
> 1.16, DBI 1.46 and Perl 5.8.5 compiled up for HP-UX 11.11 and Oracle
> 22.214.171.124, I was ready to give it a try.
> When I try to invoke oracletool now (either 2.2 or the saved version
> 2.0), I'm getting the following perl error:
> Can't load
> cle.sl' for module DBD::Oracle: No such
> file or directory at
> /opt/perl5_64/lib/5.8.5/PA-RISC2.0-LP64/DynaLoader.pm line 230.
> at oracletool.pl line 24
> Compilation failed in require at oracletool.pl line 24.
> BEGIN failed--compilation aborted at oracletool.pl line 24.
> [Tue Feb 01 16:35:21 2005] [error] [client 126.96.36.199] Premature
> end of script headers: oracletool.pl
> Now, I've checked the permissions on
> le.sl and it appears to be globally readable:
> root rtsihp7 /opt/hpapache2/logs# su - www
> [snip HP Copyright info at login]
> $ file
> le.sl: ELF-64 shared object file - PA-RISC 2.0 (LP64)
> Oracletool also comes with a basic test script that connects to the
> database and runs "select sysdate from dual" and reports it. This is
> giving me the same error. Unfortunately I don't know a whole lot
> about perl or Apache.
> As another test, I tried to run the example.cgi script mentioned in
> the above paragraph from the command line, and it's reporting the same
> message, so I guess that rules out apache.
> Anyone have ideas as to why this can't load?
> Stephen Wales
> Senior Database Administrator
> Rio Tinto Services Inc.
> Phone: 801-252-3623
> Fax: 801-252-3522
> Mobile: 801-699-1774
> E-mail: email@example.com
> "Delivering Superior Service"
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.