oracle 无效path,无法加载Oracle.so和无效命令PerlHandler

锐英源精品开源心得,转载请注明:“锐英源www.wisestudy.cn,孙老师作品,电话13803810136。需要全文内容也请联系孙老师。

无法加载Oracle.so和无效命令PerlHandler

install_driver(Oracle)失败:无法加载“……/ DBD / Oracle / Oracle.so”

install_driver(Oracle) failed: Can’t load

’/usr/lib/perl5/site_perl/5.005/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.00503/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 (a.k.a., Apache). This isn’t a problem for CGI script since they don’t do a setuid (and are forked off), but Apache does, and mod_perl is in Apache. Therefore the first solution is to explicitly load the library from the system wide ldconfig configuration file:

在BSD风格的文件系统LD_LIBRARY_PATH不为setuid程序(或称Apache)搜索。这不是一个CGI脚本的问题,因为他们没有做一个setuid(并且分叉关闭),但是Apache可以做,并且mod_perl在Apache中。因此,第一解决方案是明确地从系统范围配置LDCONFIG文件加载库:

# echo $ORACLE_HOME/lib >> /etc/ld.so.conf

# ldconfig

Another solution to this problem is to modify the resulting Makefile ( after running perl Makefile. PL) as follows: 这个问题的另一个解决方案是修改Makefile的结果(运行perl Makefile.PL之后)如下:

1. search for the line LD_RUN_PATH= 搜索行LD_RUN_PATH=

2. replace it with LD_RUN_PATH=(my_oracle_home)/lib 把它换成LD_RUN_PATH =(my_oracle_home)/ lib

(my_oracle_home) is, of course, the home path to your oracle installation. In particular, the file libclntsh.so.8.0 should exist in that directory. (If you use CPAN, the build directory for DBD::Oracle should be in ~/.cpan/build/DBD-Oracle-1.06/ if you’re logged in as root.)

(my_oracle_home)当然是oracle的安装路径。特别是,该文件libclntsh.so.8.0 shoulderstand存在于DASS目录。(如果你作为根用户登录,使用CPAN,DBD::Oracle的构建目录应该在~/.cpan/build/DBD-Oracle-1.06/)。

Then, just type make install, and all should go well. 然后,输入make install,应该不会错。

FYI, setting LD_RUN_PATH has the effect of hard-coding the path to (my_oracle_home)/lib in the resulting Oracle.so file generated by the DBD::Oracle so that at run-time, it doesn’t have to go searching through LD_LIBRARY_PATH or the default directories used by ld. 仅供参考,设置LD_RUN_PATH的写入程序的路径(my_oracle_home)/ lib作为通过DBD::Oracle产生的Oracle.so文件,以便在运行时,它没有通过ld搜索LD_LIBRARY_PATH或默认目录。

For more information see the ld manpage and an essay on LD_LIBRARY_PATH: http://www.visi.com/~barr/ldpath.html 欲了解更多信息,请参阅ld手册页和LD_LIBRARY_PATH散文:http://www.visi.com/~barr/ldpath.html

Invalid command “PerlHandler”... 无效命令“PerlHandler”……

Syntax error on line 393 of /etc/httpd/conf/httpd.conf:

Invalid command ’PerlHandler’, perhaps mis-spelled

or defined by a module not included in the server configuration [FAILED]

This can happen when you have a mod_perl enabled Apache compiled with DSO (generally it’s an installed RPM or other binary package) but the mod_perl module isn’t loaded. In this case you have to tell Apache to load mod_perl by adding:

当你有一个mod_perl启动Apache编译DSO(通常是一个已安装的RPM或其他二进制包)但mod_perl模块不加载时可能会发生这种情况。在这种情况下你必须告诉Apache加载mod_perl,方法如下:

AddModule mod_perl.c

in your httpd.conf. 在你的httpd.conf中。

This can also happen when you try to run a non-mod_perl Apache server using the configuration from a mod_perl server.

当你使用配置试图从一个mod_perl服务器运行一个non-mod_perl Apache服务器时这也会发生。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值