zoukankan      html  css  js  c++  java
  • install_driver(Oracle) failed: Can't load `.../DBD/Oracle/Oracle.so' for module DBD::Oracle

    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 .
  • 相关阅读:
    折腾了好久的输入法显示已禁用
    文件下载上传小工具
    隐藏进程命令行参数,例如输入密码等高危操作
    创建并使用https证书
    编译lua可执行程序
    使用msys2在window下构建和使用Linux的软件
    golang遍历时修改被遍历对象
    使用shell发送邮件,方便快捷
    关于golang的time包总结
    获取Win和Linux系统启动时间,类似uptime功能,用于判断是否修改过系统时间
  • 原文地址:https://www.cnblogs.com/wanghang/p/6299319.html
Copyright © 2011-2022 走看看