Re: I have a weird issue with a script running under cron
Bruce Ferrell <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.dbi.general |
|---|---|
| Message-ID | <[email protected]> |
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. 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? >