install_driver(oracle) failed:,install_driver(Oracle) failed: Can't load `.../DBD/Oracle/Oracle.so' ...

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 .

随机推荐

linux运维中的命令梳理(四)

----------管理命令---------- ps命令:查看进程 要对系统中进程进行监测控制,查看状态,内存,CPU的使用情况,使用命令:/bin/ps (1) ps :是显示瞬间进程的状态,并不 ...

字符串(后缀数组||SAM):NOI2015 品酒大会

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAByIAAALuCAIAAABtq0bwAAAgAElEQVR4nOy9f2wb150vev4boESeln ...

excel笔记

提取单元格中的数字部分 =MID(LOOKUP(1,-(1&MID(A1,MIN(FIND({0;1;2;3;4;5;6;7;8;9},A1&1/17)),ROW($1:$15)))) ...

FFTW程序Demo

#include #include #include #include # ...

(转)Hadoop的InputFormats和OutputFormats

Data Mining Hadoop的InputFormats和OutputFormats InputFormat InputFormat类用来产生InputSplit,并把它切分成record. p ...

UVA 10905 Children's Game (贪心)

Children's Game Problem Description There are lots of number games for children. These games are pre ...

Ubuntu发行版升级

从UK 13.10升级到UK 14.10 方法一: 1.sudo apt-get update   2.sudo update-manager -c -d   3.选择upgrade(升级)  方法二 ...

jQuery的deferred对象解析

参考: jQuery的deferred对象详解:http://www.ruanyifeng.com/blog/2011/08/a_detailed_explanation_of_jquery_defe ...

实现简单的printf函数

首先,要介绍一下printf实现的原理 printf函数原型如下: int printf(const char* format,...); 返回值是int,返回输出的字符个数. 例如: int mai ...

crm 添加用户 编辑用户 公户和私户的展示,公户和私户的转化

1.添加用户 和编辑可以写在一起 urls.py url(r'^customer_add/', customer.customer_change, name='customer_add'), url( ...

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值