snuvvula has asked for the wisdom of the Perl Monks concerning the following question:

Hi All,

Am getting following error after Oracle upgrade to 11.2 from 11.1.

Any help/advice. Thanks

install_driver(Oracle) failed: Can't load '/opt/info1tools/lib/perl5/s +ite_perl/5.8.8/aix/auto/DBD/Oracle/Oracle.so' for module DBD:\:Oracle +:                0509-022 Cannot load module /opt/xxx/lib/perl5/site_pe +rl/5.8.8/aix/auto/DBD/Oracle/Oracle.so.                 0509-150   Dependent module libclntsh.so could not be +loaded.                 0509-022 Cannot load module libclntsh.so.                 0509-026 System error: A file or directory in the path + name does not exist. install_driver(Oracle) failed: Can't load '/opt/xxx/lib/perl5/site_per +l/5.8.8/aix/auto/DBD/Oracle/Oracle.so' for module DBD:\:Oracle:                0509-022 Cannot load module /opt/xxx/lib/perl5/site_pe +rl/5.8.8/aix/auto/DBD/Oracle/Oracle.so.                 0509-150   Dependent module libclntsh.so could not be +loaded.                 0509-022 Cannot load module libclntsh.so.                 0509-026 System error: A file or directory in the path + name does not exist.

Replies are listed 'Best First'.
Re: Oracle library error
by marto (Cardinal) on May 09, 2017 at 11:08 UTC
      Hi, thanks for the response. Recently we have upgraded our Oracle version to 11.2. since then we have been observing this error. No, we have not changed ORACLE_HOME path.

        You've change Oracle, the path will be different, you haven't updated your environment to compensate for the installation of the new version. Update: If unsure speak to your systems administrator. Also DBD::Oracle.

Re: Oracle library error
by tweetiepooh (Hermit) on May 09, 2017 at 12:22 UTC

    Is libclntsh.so where it is expected to be? If the path to the Oracle libraries has changed (includes version number) has that been reflected in your library path?

    You can check what's happening using ldd /opt/info1tools/lib/perl5/site_perl/5.8.8/aix/auto/DBD/Oracle/Oracle.so. This will show what libraries are found against the Perl library file. If not found you can try export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path to Oracle libs>. When using instant client we have found we have sometimes needed to create links to the instant library directory for sub directories like lib. e.g. ln -s <instant client dir> <instant client dir>/lib

    One thing we have in some of our Oracle Perl scripts is at startup we check for Oracle environment and if not set we set that up then exec the script over itself. Maybe not the best way but it does work both from command line/shell and cron.

      I get following error while i run ldd command. ldd /opt/XXX/lib/perl5/site_perl/5.8.8/aix/auto/DBD/Oracle/Oracle.so /opt/XXX/lib/perl5/site_perl/5.8.8/aix/auto/DBD/Oracle/Oracle.so needs: /usr/lib/libc.a(shr.o) Cannot find libclntsh.so /unix /usr/lib/libcrypt.a(shr.o)
        Any update please?