Oracle DBD/DBI on Solaris: can't resolve libclntsh.so.8.0 
Author Message
 Oracle DBD/DBI on Solaris: can't resolve libclntsh.so.8.0

As told in a previous message, I've succesfully compiled and used the
Oracle module on a Solaris box, but I can't move them to a similar box
in a different place.

The "target" machine has perl and a wroking Oracle instance. I don't
have root permissions on it, but I can telnet to it.
I'd like to know exactly what steps I'll have to go through when the
next release of my application (which will need the Perl/Oracle part) is
due. I'm prepared to recompile everything on the target machine, even if
this requires installing gcc (and possibli GNU make) on it... stuff I'd
prefer not to install, considering that the target is intended as a
production platform, and no compilers should be neeeded.

Amon other things, I tried to create a subdir of my working dir (/small)
and put the DBI stuff in it, adding:

 use lib  '/small/libs';

at the start of the script

and then going on with:

 use DBI;
 $dbname="SML2";
 $user="developer";
 $passwd="dev_1";

 $dbh = DBI->connect("dbi:Oracle:host=small;sid=SML2", $user, $passwd);

and so on...

unfortunately, I keep getting:

perl testDB.pl
install_driver(Oracle) failed: Can't load
'/small/libs/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: ld.so.1:
perl: fatal: libclntsh.so.8.0: open failed: No such file or directory at
/usr/local/lib/perl5/5.00503/sun4-solaris/DynaLoader.pm line 169.

 at (eval 1) line 3
Perhaps a required shared library or dll isn't installed where expected
 at testDB.pl line 7

According to the source of DynaLoader module:

    # 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.

The problem seems to be related to libclntsh.so.8.0, which is located in
/oracle/app/oracle/product/8.1.6/lib on the target machine, while
"original" machine (the one on which I compiled the DBI module) has it
in /oracle/u01/app/oracle/product/8.1.6/lib

I tried to rebuild the same directory tree on the target and set a link
to the library file, so that libclntsh.so.8.0 is now "virtually" in the
same place on both machines, but I get exactly the same problem.

Any ideas? Is there any other way to make it work, apart from
recompiling everything on the target?

TIA,

Paolo Marino



Sun, 29 Jun 2003 20:52:04 GMT  
 Oracle DBD/DBI on Solaris: can't resolve libclntsh.so.8.0
Hi Paolo,

Try adding $ORACLE_HOME/lib to your LD_LIBRARY_PATH

Mark

Quote:

> As told in a previous message, I've succesfully compiled and used the
> Oracle module on a Solaris box, but I can't move them to a similar box
> in a different place.

> The "target" machine has perl and a wroking Oracle instance. I don't
> have root permissions on it, but I can telnet to it.
> I'd like to know exactly what steps I'll have to go through when the
> next release of my application (which will need the Perl/Oracle part) is
> due. I'm prepared to recompile everything on the target machine, even if
> this requires installing gcc (and possibli GNU make) on it... stuff I'd
> prefer not to install, considering that the target is intended as a
> production platform, and no compilers should be neeeded.

> Amon other things, I tried to create a subdir of my working dir (/small)
> and put the DBI stuff in it, adding:

>  use lib  '/small/libs';

> at the start of the script

> and then going on with:

>  use DBI;
>  $dbname="SML2";
>  $user="developer";
>  $passwd="dev_1";

>  $dbh = DBI->connect("dbi:Oracle:host=small;sid=SML2", $user, $passwd);

> and so on...

> unfortunately, I keep getting:

> perl testDB.pl
> install_driver(Oracle) failed: Can't load
> '/small/libs/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: ld.so.1:
> perl: fatal: libclntsh.so.8.0: open failed: No such file or directory at
> /usr/local/lib/perl5/5.00503/sun4-solaris/DynaLoader.pm line 169.

>  at (eval 1) line 3
> Perhaps a required shared library or dll isn't installed where expected
>  at testDB.pl line 7

> According to the source of DynaLoader module:

>     # 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.

> The problem seems to be related to libclntsh.so.8.0, which is located in
> /oracle/app/oracle/product/8.1.6/lib on the target machine, while
> "original" machine (the one on which I compiled the DBI module) has it
> in /oracle/u01/app/oracle/product/8.1.6/lib

> I tried to rebuild the same directory tree on the target and set a link
> to the library file, so that libclntsh.so.8.0 is now "virtually" in the
> same place on both machines, but I get exactly the same problem.

> Any ideas? Is there any other way to make it work, apart from
> recompiling everything on the target?

> TIA,

> Paolo Marino



Sun, 29 Jun 2003 23:54:50 GMT  
 Oracle DBD/DBI on Solaris: can't resolve libclntsh.so.8.0

Quote:

> Hi Paolo,

> Try adding $ORACLE_HOME/lib to your LD_LIBRARY_PATH

Thank you very much! It Worked!

From a quick google search on the topic I gathered that the
LD_LIBRARY_PATH can be misused, so I'll try to use it only in wrappers
calling the perl routines, or more generally will try to exercise a
little restraint in using it.

Anyway, a big thank you! I'm far from being a Unix expert, and this
really swamped me.

Paolo Marino.



Mon, 30 Jun 2003 15:38:16 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Oracle DBD/DBI on HP-UX: can't load Oracle.sl

2. help needed installing DBI and DBD::Oracle on Solaris 7

3. can't retrieve data from Oracle DB using DBI and DBD

4. Building DBD::Oracle on SOlaris 8 with Oracle 9i 64-bit

5. DBI/DBD/Oracle connect won't work (ORA-12154)

6. Oracle Upgrade's impact on DBD:DBI

7. Help with DBI and DBD::Oracle and CLOB's

8. Oracle DBD/DBI on Solaris: 'make' fails

9. DBD-Oracle.ppd for Solaris

10. DBD Module Oracle 8.1.6 on Solaris

11. Binaries for DBD-Oracle on Solaris 2.6 SPARC

12. DBD::Oracle -- OCIInitialize not found error on Solaris

 

 
Powered by phpBB® Forum Software