Solaris 5.10上的Oracle DBI perl模块

时间:2012-09-28 20:25:02

标签: perl oracle dbi

我正在尝试编写一个简单的perl脚本来检查ORCL中的一些数据。

我的PERL5LIB设置为

/opt/oracle/product/client10.2.0.3/perl/lib/site_perl/5.8.3/sun4-solaris-thread-multi-64

是DBD / Oracle.pm

的父目录

然而,当我跑

> perl -e 'use DBD::Oracle; print $DBD::Oracle::VERSION,"\n";'

我收到以下错误:

Can't load '/opt/oracle/product/client10.2.0.3/perl/lib/site_perl/5.8.3/sun4-solaris-thread-multi-64/auto/DBI/DBI.so' for module DBI: ld.so.1: perl: fatal: /opt/oracle/product/client10.2.0.3/perl/lib/site_perl/5.8.3/sun4-solaris-thread-multi-64/auto/DBI/DBI.so: wrong ELF class: ELFCLASS64 at /usr/perl5/5.8.4/lib/sun4-solaris-64int/DynaLoader.pm line 230.
 at /opt/oracle/product/client10.2.0.3/perl/lib/site_perl/5.8.3/sun4-solaris-thread-multi-64/DBI.pm line 252
BEGIN failed--compilation aborted at /opt/oracle/product/client10.2.0.3/perl/lib/site_perl/5.8.3/sun4-solaris-thread-multi-64/DBI.pm line 252.
Compilation failed in require at /opt/oracle/product/client10.2.0.3/perl/lib/site_perl/5.8.3/sun4-solaris-thread-multi-64/DBD/Oracle.pm line 20.
BEGIN failed--compilation aborted at /opt/oracle/product/client10.2.0.3/perl/lib/site_perl/5.8.3/sun4-solaris-thread-multi-64/DBD/Oracle.pm line 20.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

在我运行一个试图调用DBD / DBI的脚本时说:

use DBI;
use DBD::Oracle;

我得到了

Can't load '/opt/oracle/product/client10.2.0.3/perl/lib/site_perl/5.8.3/sun4-solaris-thread-multi-64/auto/DBI/DBI.so' for module DBI: ld.so.1: perl: fatal: /opt/oracle/product/client10.2.0.3/perl/lib/site_perl/5.8.3/sun4-solaris-thread-multi-64/auto/DBI/DBI.so: wrong ELF class: ELFCLASS64 at /usr/perl5/5.8.4/lib/sun4-solaris-64int/DynaLoader.pm line 230.
 at /opt/oracle/product/client10.2.0.3/perl/lib/site_perl/5.8.3/sun4-solaris-thread-multi-64/DBI.pm line 252
BEGIN failed--compilation aborted at /opt/oracle/product/client10.2.0.3/perl/lib/site_perl/5.8.3/sun4-solaris-thread-multi-64/DBI.pm line 252.

有趣的是,在设置PERL5LIB之前,当我运行

> perl -e 'use DBI; print $DBI::VERSION,"\n";'

我得到1.58。但是当我在设置PERL5LIB之后运行相同的命令时,我收到类似于上面DBD :: Oracle的错误 我错过了什么?

由于

0 个答案:

没有答案