install_driver(Oracle) failed: Can't load `.../DBD/Oracle/Oracle.so' for module DBD::Oracle
来源:互联网 发布:网络作家收入如何 编辑:程序博客网 时间:2024/05/20 08:01
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 .
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 .
0 0
- 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
- install_driver(Oracle) failed: Can't load `.../DBD/Oracle/Oracle.so' for module DBD::Oracle
- Can't load Oracle.so for module DBD::Oracle
- install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so'
- install_driver oracle failed can't locate dbd/oracle.pm in @inc
- 遇到问题----------安装DBD:mysql时报错install_driver(mysql) failed: Can't load '/usr/lib64/perl5/site_perl/5.8
- install_driver(Pg) failed: Can't locate DBD/Pg.pm in @INC
- 关于perl中DBD for Oracle的安装
- 在Cygwin中安装DBD::Oracle,
- Oracle Programming with Perl DBI / DBD
- Installing DBI / DBD-Oracle with ActivePerl
- Centos 安装DBI和ORACLE DBD
- Can't load '/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/DBD/mysql/mysql.so' for modu
- linux下安装oracle-client 和 DBD::Oracle和DBD::Pg
- Perl DBD::Oracle模块访问数据库中文记录
- perl连接oracle,DBI,DBD,Data-ShowTable安装
- failed: Can’t locate DBD/mysql.pm的解决办法
- 32 的timers中断处理 两种方式
- APUE学习之旅-第一章:UNIX System Over view
- UITableView仿QQ好友的分组收缩展开界面
- sql语句 根据条件分支执行--执行sql语句中的一部分(oracle)
- Spring MVC 教程,快速入门,深入分析
- install_driver(Oracle) failed: Can't load `.../DBD/Oracle/Oracle.so' for module DBD::Oracle
- import javax.servlet 出错
- SEO优化的那些事
- 设计模式--代理模式Proxy(结构型)
- test
- 经典内部排序之交换排序
- static语句块、构造语句块(就是只有大括号的那块)以及构造函数的执行顺序
- 行列倒置(一)(oracle)
- 23种设计模式(6):模版方法模式