Is LD_LIBRARY_PATH exported? It's hard to see whats going on without a full test case.

On 2/17/2014 1:50 PM, Bruce Johnson wrote:
On Feb 17, 2014, at 11:41 AM, Bruce Ferrell <bferr...@baywinds.org> 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…

On 02/17/2014 10:30 AM, Bruce Johnson wrote:
I get the following error:

install_driver(Oracle) failed: Can't load 
'/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: 
libocci.so.11.1: cannot open shared object file: No such file or directory at 
/usr/lib64/perl5/DynaLoader.pm line 200, <DATA> line 749.
at (eval 10) line 3
Compilation failed in require at (eval 10) line 3, <DATA> line 749.
Perhaps a required shared library or dll isn't installed where expected
at /home/allwebfiles/perl/kfs/kfsupdate.pl line 21

The script runs just fine when run interactively in a shell.

This normally means an issue with Oracle environment variables, but I wrote 
another script that simply lists %ENV. When run in the same crontab I get:

Environment variables
HOME = /root
LD_LIBRARY_PATH = /usr/lib/oracle/11.2/client64/lib
LOGNAME = root
ORACLE_HOME = /usr/lib/oracle/11.2/client64
ORACLE_SID = phmweb
PATH = /usr/bin:/bin
PWD = /root
SHELL = /bin/sh
SHLVL = 1
USER = root
_ = /home/allwebfiles/perl/kfs/showenvcron.pl

These are the correct values.

So what am I missing?


Reply via email to