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的更多相关文章

  1. MySQL MHA /usr/share/perl5/vendor_perl/MHA/ServerManager.pm, ln301] install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted

    在公司随便找3台测试机搭个MHA,下面这个问题折腾了三天,之前没遇到过,查了OS版本发现一致,可能是不同人弄的OS吧,知道是cpan的问题就是搞不定,郁闷...[root@test247 ~]# ma ...

  2. install_driver(mysql) failed

        安装好了mysql监控神器innotop,正得意,innotoop不可用,其错误提示为install_driver(mysql) failed: Can't load '/usr/lib64/ ...

  3. Navicat 连接 Oracle数据库 提示 cannot load OCI DLL 的解决

    一.32位系统下 cannot load OCI DLL,126 解决方法:工具->选项->OCI 选择oracle安装目录下bin里面的oci.dll 二 .在64位系统下安装了Orac ...

  4. Connection to Oracle failed. [66000][12505] Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor .

    我安装了Oracle数据库,默认的数据库用户名是system,密码口令是安装过程中你自己设置的.可以先使用命令框,输入 sqlplus system; 然后再输入密码即可. 然后我的数据库连接工具使用 ...

  5. undo丢失恢复异常恢复,运维DBA反映Oracle数据库无法启动报错ORA-01157 ORA-01110,分析原因为Oracle数据库坏块导致

    本文转自 惜纷飞 大师. 模拟基表事务未提交数据库crash,undo丢失恢复异常恢复,运维DBA反映Oracle数据库无法启动报错ORA-01157 ORA-01110,分析原因为Oracle数据库 ...

  6. tomcat启动异常(严重: Dispatcher initialization failed Unable to load configuration. - [unknown location] )

    严重: Dispatcher initialization failed Unable to load configuration. - [unknown location] at com.opens ...

  7. 尝试加载 Oracle 客户端库时引发 BadImageFormatException。如果在安装 32 位 Oracle 客户端组件的情况下以 64 位模式运行,将出现此问题。

    从10G开始,Oracle提供了一个较为轻量级的客户包,叫做Instant Client. 将它安装好后,就不用再安装庞大的Oracle Client了. 这样一来,只要客户端下载Instant Cl ...

  8. webservice 尝试加载 Oracle 客户端库时引发 BadImageFormatException。如果在安装 32 位 Oracle 客户端组件的情况下运行,将出现此问题

    最近做的项目中,应用服务器迁移到另外一台服务器,操作系统升级为win10,配置好IIS里的应用程序发布网站和Webservice网站后, 客户端程序调用Webservice出错: “尝试加载 Orac ...

  9. “尝试加载 Oracle 客户端库时引发 BadImageFormatException。如果在安装 32 位 Oracle 客户端组件的情况下以 64 位模式运行,将出现此问题。”

    远程连接服务器的数据库调试WCF程序时,可以正常访问数据库,但将程序发布成站点部署在数据库所在的服务器之后,一直报错,通过try/catch捕获得到以下报错信息: System.Exception: ...

随机推荐

  1. [ Java学习基础 ] Java的继承与多态

    看到自己写的东西(4.22的随笔[ Java学习基础 ] Java构造函数)第一次达到阅读100+的成就还是挺欣慰的,感谢大家的支持!希望以后能继续和大家共同学习,共同努力,一起进步!共勉! ---- ...

  2. js登录,回车登录

    $(document).ready(function(){ $("#loginBtn").click(doLoginEvent); loadCookies(); //回车登录 do ...

  3. 整理spring定时器corn表达式

    1.结构 corn从左到右(用空格隔开):秒 分 小时 月份中的日期 月份 星期中的日期 年份 2.各字段的含义   字段 允许值 允许的特殊字符 秒 0~59 - * / 分 0~59 - * / ...

  4. Python中如何自定义一个计时器

    import time as t class MyTimer(): # 初始化构造函数 def __init__(self): self.prompt = "未开始计时..." s ...

  5. ng-book札记——HTTP

    Angular拥有自己的HTTP库,可以用于调用外部API. 在JavaScript世界里有三种方式可以实现异步请求,Callback,Promise与Observable.Angular倾向于使用O ...

  6. CodeForces - 766B Mahmoud and a Triangle

    [题意概述] 给定一串数,从中挑三个,判断能否组成一个有正面积的三角形,如果能就输出YES,否则就输出NO [题目分析] 将 n 个数从大到小进行排列,三个三个往下去判断,只要后两个的和比第一个大的时 ...

  7. 启动Docker容器

    启动容器有两种方式,一种是基于镜像新建一个容器并启动,另外一个是将在终止状态(stopped)的容器重新启动. 因为 Docker 的容器实在太轻量级了,很多时候用户都是随时删除和新创建容器. 新建并 ...

  8. Gradle 1.12用户指南翻译——第46章. Java 库发布插件

    本文由CSDN博客貌似掉线翻译,其他章节的翻译请参见: http://blog.csdn.net/column/details/gradle-translation.html 翻译项目请关注Githu ...

  9. Bootstrap3 排版-地址

    让联系信息以最接近日常使用的格式呈现.在每行结尾添加 可以保留需要的样式. Twitter, Inc. 795 Folsom Ave, Suite 600 San Francisco, CA 9410 ...

  10. Mac小技巧:快速查看指定应用程序的所有窗口

    我们知道在Mac中快速在系统所有程序中切换得快捷键为: cmd + tab 不过有时我们需要快速查看某一个程序的所有窗口,那又该如何呢? 以下方法在MacOS 10.12中测试成功! Mac默认该功能 ...