Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Perl DBI problem
I have a simple Perl program using DBI trying to connect to Oracle 8.1.6 on
Solaris 2.6. I got the following error:
$ testdb.pl ip2 ip1 ip1
install_driver(Oracle) failed: Can't load
'/usr/local/lib/perl5/site_perl/sun4-solaris/auto/DBD/Oracle/Oracle.so' for
module DBD::Oracle: ld.so.1: /usr/local/bin/perl: fatal: relocation error: file
/usr/local/lib/perl5/site_perl/sun4-solaris/auto/DBD/Oracle/Oracle.so: symbol
nauzaoss: referenced symbol not found at
/usr/local/lib/perl5/sun4-solaris/5.00404/DynaLoader.pm line 166.
at (eval 1) line 2
at testdb.pl line 12
The Perl script lines 1 to 12 are:
$ more testdb.pl
#!/usr/local/bin/perl -w # test connection to database using DBI/dbd # syntax perl testdb.pl two_task user password ########################################################use DBI;
Messages on deja.com and Metalink suggest re-generating the shared library libclntsh.so using genlibclntsh. I did. I also tried setting LD_LIBRARY_PATH. Got the same error.
Interestingly, when I add this line
unshift @INC, "/serv/oracle/OraHome1/lib";
, I got a different error:
install_driver(Oracle) failed: Can't load
'/usr/local/lib/perl5/site_perl/sun4-s
olaris/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: ld.so.1:
/usr/local/bi
n/perl: fatal: libclntsh.so.8.0: open failed: No such file or directory at
/usr/
local/lib/perl5/sun4-solaris/5.00404/DynaLoader.pm line 166.
Any advice is appreciated.
Yong Huang
yong321_at_yahoo.com
![]() |
![]() |