install_driver(Oracle) failed: Can't load `.../DBD/Oracle/Oracle.so' for module DBD::Oracle
2009-09-11 14:31
666 查看
Description
This section is from the "Practical
mod_perl
" book, by Stas
Bekman
and Eric
Cholet
. Also available from Amazon: Practical
mod_perl
Here's an example of the full error
report that you might see:
install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.8.0: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.6.1/i386-linux/DynaLoader.pm line 169. at (eval 27) line 3 Perhaps a required shared library or dll isn't installed where expected at /usr/local/apache/perl/tmp.pl line 11
On BSD-style filesystems, LD_LIBRARY_PATH
is not
searched for setuid
programs. If Apache is a
setuid
executable, you might receive this error.
Therefore, the first solution is to explicitly load the library from
the system-wide ldconfig
configuration file:
panic# echo $ORACLE_HOME/lib >> /etc/ld.so.conf panic# ldconfig (使用该方法我的问题就解决了)
Another solution to this problem is to modify the
Makefile
file (which is created when you run
perl Makefile.PL
) as follows:
Search for the line LD_RUN_PATH=
Replace it with LD_RUN_PATH=my_oracle_home/lib
where my_oracle_home
is, of course, the home
path to your Oracle installation. In particular, the file
libclntsh.so.8.0
should exist in the
lib
subdirectory.
Then just type make install
, and all should go
well.
Note that setting LD_RUN_PATH
has the effect of
hardcoding the path to my_oracle_home/lib
in the
file Oracle.so
, which is generated by
DBD::Oracle
. This is an efficiency mechanism, so
that at runtime it doesn't have to search through
LD_LIBRARY_PATH
or the default directories used by
ld
.
For more information, see the ld
manpage and the
essay on LD_LIBRARY_PATH
at
http://www.visi.com/~barr/ldpath.html
.
相关文章推荐
- install_driver(Oracle) failed: Can't load `.../DBD/Oracle/Oracle.so' for module DBD::Oracle
- install_driver(Oracle) failed: Can't load `.../DBD/Oracle/Oracle.so' for module DBD::Oracle
- Can't load Oracle.so for module DBD::Oracle
- Error occurred: install_driver(mysql) failed: Can't load '/usr/lib/perl5/site_perl/5.8.8/i386-linux-
- 遇到问题----------安装DBD:mysql时报错install_driver(mysql) failed: Can't load '/usr/lib64/perl5/site_perl/5.8
- 使用TOMCAT5.5连接池连接mysql(解决Cannot create JDBC driver of class '' for connect URL 'null' 及can not load org.gjt.mm.mysql.Driver)
- Can't load IA 32-bit .so on a IA 32-bit platform
- ejabberd unable to load driver '/lib/ejabberd/priv/lib/sha_drv.so'
- install_driver(Pg) failed: Can't locate DBD/Pg.pm in @INC
- Re: Can't install nvidia devdriver in FC15 after kernel update to 2.6.40-4
- Cannot load JDBC driver class 'oracle.jdbc.OracleDriver'
- install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so'
- Failed to load module "canberra-gtk-module": libcanberra-gtk-module.so
- How can I install Sun/Oracle's proprietary Java 6/7 JRE or JDK?
- Cannot load JDBC driver class 'oracle.jdbc.drive
- myeclipse Can't load library: /tmp/swtlib-32/libswt-mozilla-gtk.so解决
- 遇到的问题:Cannot load JDBC driver class 'oracle.jdbc.OracleDriver'
- Units specified don\'t exist SHSUCDX can\'t install 的问题
- JNI之——Can't load IA 32-bit .dll on a AMD 64-bit platform错误的解决
- fatal error: malformed or corrupted AST file: 'Unable to load module "/Users/xxx/Library/Developer/X