我有RHEL32位操作系统,我安装了libwsman1和openwsmanperlRPM来在我的perl脚本中使用wsman查询。我安装了perl的两个版本——perl5.8.8和perl5.14.4。我的perl脚本在perl5.8.8上运行得很好,但是在perl5.14.4上执行时给出“分段错误(核心转储)”。在我看来,模块/库对两个perl版本都不可用。
如果我的假设是正确的,那么如何使它对两个perl模块都可用?
我在5月份的linux系统中看到了这个问题,其中有两个不同版本的perl可用。不过,如果我在这个系统上只有perl5.14.4的话,它就可以工作了。
我试着用gdb获取代码转储,输出如下-
正在从/usr/bin/perl5.14.4读取符号…(未找到调试符号)…完成。
warning: .dynamic section for "/lib/libc.so.6" is not at the expected address
warning: difference appears to be caused by prelink, adjusting expectations
warning: .dynamic section for "/usr/lib/libgssapi_krb5.so.2" is not at the expected address
warning: difference appears to be caused by prelink, adjusting expectations
warning: .dynamic section for "/lib/libcrypto.so.6" is not at the expected address
warning: difference appears to be caused by prelink, adjusting expectations
warning: .dynamic section for "/usr/lib/libz.so.1" is not at the expected address
warning: difference appears to be caused by prelink, adjusting expectations
Reading symbols from /lib/libnsl.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
.
.
.
.
Loaded symbols for /lib/libkeyutils.so.1
Reading symbols from /lib/libresolv.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libselinux.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libselinux.so.1
Reading symbols from /lib/libsepol.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libsepol.so.1
Core was generated by `perl5.14.4 openwsman_client_FAN.pl'.
Program terminated with signal 11, Segmentation fault.
#0 0x00000000 in ?? ()
任何帮助都是非常感谢的。
谢谢。。。
最佳答案
不同版本的Perl不能共享XS库。如果您的供应商没有为这两个版本的Perl提供库,那么您必须自己编译它们。cpan
应该为你做艰苦的工作。
perlbrew如果您不喜欢一直使用环境变量和cpan配置,则可以使您的生活更轻松。