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

Hello,
while running a script using the DBD module:

use DBD::Oracle qw(:ora_types);

compilation fails on the above line with error message:

Can't load '/usr/local/lib/perl5/site_perl/oracle/9.2.0/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: ld.so.1: perl: fatal: libclntsh.so.9.0: open failed: No such file or directory at /usr/local/lib/perl5/5.8.8/sun4-solaris/DynaLoader.pm line 230.

However, when i go to the usr/local/lib/perl5/site_perl/oracle/9.2.0/auto/DBD/Oracle/ location the Oracle.so file exists (and is accesible for the applicative user). looking at the line in the Dynaloader.pm package i see there is a comment:
# Many dynamic extension loading problems will appear to come from # this section of code: XYZ failed at line 123 of DynaLoader.pm. # Often these errors are actually occurring in the initialisation # C code of the extension XS file. Perl reports the error as being # in this perl code simply because this was the last perl code # it executed.
I am not realy sure what this means. When I run the same script from a different user (with similar configuration) it compiles fine.
Any help would be appreciated.

Replies are listed 'Best First'.
Re: Dynaloader.pm common (?) problem
by Anonymous Monk on Apr 24, 2009 at 12:27 UTC
    ld.so.1: perl: fatal: libclntsh.so.9.0: open failed: No such file or directory
      Didn't spot that AM ...

      What the AM is (IMO, rather unhelpfully) suggesting is that one, or more, libraries on which Oracle depends e.g. in this case the client shell, are (apparently) not present on your system.

      A user level that continues to overstate my experience :-))
        rather unhelpfully?
        A reply falls below the community's threshold of quality. You may see it by logging in.
      The problem was that there was no oracle 9 anyway on this server (not anymore, and that of course is the root of this particular evil).
      The profile of the user lacked an update of PERL5LIB var (and I of course was looking at ORACLE_HOME)
Re: Dynaloader.pm common (?) problem
by Bloodnok (Vicar) on Apr 24, 2009 at 12:26 UTC
    Does the applicative user have the appropriate rights i.e. the same as the successful user, all the way down the path to the library ?

    A user level that continues to overstate my experience :-))
      the rights on the library folders (and road towards them) are the same as far as I can see, the PATH variable is the same, they belong to the same group...
      (hence a similar user)