锐英源软件
第一信赖

精通

英语

开源

擅长

开发

培训

胸怀四海 

第一信赖

当前位置:锐英源 / 英语翻译 / Apache / 安装多个Perl或/usr/lib/目录下有libperl导致编译模糊问题
服务方向
人工智能数据处理
人工智能培训
kaldi数据准备
小语种语音识别
语音识别标注
语音识别系统
语音识别转文字
kaldi开发技术服务
软件开发
运动控制卡上位机
机械加工软件
软件开发培训
Java 安卓移动开发
VC++
C#软件
汇编和破解
驱动开发
联系方式
固话:0371-63888850
手机:138-0381-0136
Q Q:396806883
微信:ryysoft

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

安装多个Perl或/usr/lib/目录下有libperl导致编译模糊问题

Although the httpd executable was successfully built, you can still have make failures. The output could include the following errors:

虽然httpd的可执行程序已成功建成,你仍然会出现故障。输出可能包括以下错误:
relocation error: 重置错误:
undefined symbol: PL_dowarn 未定义符号:PL_dowarn

This class of errors is often due to multiple installations of Perl. Having libperl.so in /usr/lib/ is a great reason for lots of obscure problems, when you have one more perl installed elsewhere. That’s why perl puts its libperl.so under its private tree (e.g., /usr/lib/perl5/5.8.3/i686/CORE/). But some distributions decide to put it along with the rest of system libraries, not expecting that users will have extra perl installations.

这类错误通常是由于安装多个Perl. 当你在安装多个perl时,/usr/lib/目录下有libperl是主要原因,它会导致很多模糊错误。这就是为什么perl使其libperl作为私有的(如/usr/lib/perl5/5.8.3/i686/CORE/)。但是一些发行版本决定把它和其他系统库放在一起,不希望用户额外安装perl。

To resolve the problem you need to check what perl library the application finds. This is easy to check with the help of ldd(1). 解决这个问题你需要检查perl库的应用程序。这在ldd(1)的帮助下是很容易检查的。

If your mod_perl is statically linked with httpd, you need to check the httpd executable whether it’s linked against libperl.so: 如果你的mod_perl和httpd是静态链接,您需要检查httpd针对 libperl的链接是否是可执行的,这样:

% ldd /path/to/apache/bin/httpd

If the output includes libperl.so check that the path is to the version of Perl you’ve built mod_perl with. If your httpd executable is reported to link against the wrong libperl.so file, you’ve found the cause of the problem. You should either ask your distributor to not put the perl library into the global system libs directory, or use some other solution to force the loading of the right library, which is usually very platform specific. For example on Linux one can preload a specific library path using the LD_PRELOAD environment variable. So if the wanted library is located at /usr/lib/perl5/5.8.3/i686/CORE/libperl.so you can make httpd use it with:

如果输出包括libperl,那么检查的路径就是您已经编译的带有mod_perl的Perl版本。如果你的httpd执行文件被报出错误的libperl链接。所以这个文件就是你问题的原因。你应该让你的经销商不要把perl库放到全局系统库目录里,或使用其他一些解决方法强制加载正确的库,这通常是特定于平台的 。例如在Linux上使用预加载LD_PRELOAD环境变量制定库的路径。因此,如果你想让库位于/usr/lib/perl5/5.8.3/i686/CORE/libperl的位置,.那么你可以通过httpd使用:

% LD_PRELOAD=/usr/lib/perl5/5.8.3/i686/CORE/libperl.so httpd

If mod_perl is built as DSO, you will need to check the mod_perl module (and not httpd) with ldd. Confusingly, mod_perl 1.0 module name is the same as of Perl: libperl.so. If for example the mod_perl module is located in /path/to/apache/libexec/, the command would be:

如果 mod_perl创建为DSO,您需要检查mod_perl ldd模块(而不是httpd)。令人困惑的是,mod_perl 1.0的模块名称和Perl是一样的:libperl.so。如果假设mod_perl模块位/path/to/apache/libexec/,命令是:

% ldd /path/to/apache/libexec/libperl.so

There could be another variation of the problem where a Perl used to build mod_perl is statically linked and again, during the build time a wrong static archive (e.g., /usr/lib/libperl.a) is picked by the linker. If Perl is statically linked, running:
可能这个问题有另外一种变化,,一个Perl用于编译mod_perl再一次静态链接,在编译时一个错误的静态档案(如/usr/lib/libperl.a)被链接器选中。如果Perl是静态链接,运行:

% perl -V:useshrplib

will say:会显示:

useshrplib=’false’

Again, the solution may vary from system to system, but moving /usr/lib/libperl.a away while building mod_perl is probably the simplest. 再次声明,不同系统的解决方案可能会有所不同,但移出/usr/lib/libperl且编译mod_perl可能是最简单的。

友情链接
版权所有 Copyright(c)2004-2021 锐英源软件
公司注册号:410105000449586 豫ICP备08007559号 最佳分辨率 1024*768
地址:郑州大学北校区院(文化路97号院)内