Re: I have a weird issue with a script running under cron
"Martin J. Evans" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.dbi.general |
|---|---|
| Message-ID | <[email protected]> |
On 17/02/14 18:50, Bruce Johnson wrote: > > On Feb 17, 2014, at 11:41 AM, Bruce Ferrell <[email protected]> wrote: > >> Bruce, >> >> The error says your script is attempting to load >> >> /usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so >> >> for DBD::Oracle. is that the correct path for that library? it looks like you built DBD::Oracle against the Oracle occi libraries and those are often in different locations than the regular client libs. Where is libocci.so.11.1 located? Make sure that path is available also. >> > > I built DBD::Oracle against this Instant client install. Both command-line and web apps run fine, it’s just this cron job. > > [root@merthiolate bin]# find / -name libocci.so.11.1 -print > /usr/lib/oracle/11.2/client64/lib/libocci.so.11.1 > > Right where it’s supposed to be on $LD_LIBRARY_PATH > > Permissions are correct as well : > > -rw-r--r-- 1 root root 1971762 Sep 17 2011 /usr/lib/oracle/11.2/client64/lib/libocci.so.11.1 > > This is odd… Just as an aside as this caught me out yesterday. I moved our test system to the latest instant client and DBD::Oracle. As per usual I changed LD_LIBRARY_PATH to point to new instant client but when I ran perl Makefile.PL I noticed it set ORACLE_HOME to the OLD instant client path. I wondered how it had managed to do that then realised my PATH still pointed to the old instant client and it had managed to run sqlplus from there and chosen the old path. It was easily solved by setting my PATH to the new instant client too. Martin