我在生产中(在AIX 5.3上)使用modperl设置下的XML::Parser时遇到了一个问题。它在开发中运行良好,但在生产中失败,并出现以下错误:
[Tue Apr 03 08:44:03 2012] [error] Can't load '/wload/es1p/app/perl/lib/site_perl/5.10.1/aix/auto/XML/Parser/Expat/Expat.so' for mo
ule XML::Parser::Expat: Could not load module /wload/es1p/app/perl/lib/site_perl/5.10.1/aix/auto/XML/Parser/Expat/Expat.so.ntDepe
dent module /wload/es1p/app/usr/local/apache2/lib/libexpat.a(libexpat.so.1) could not be loaded.ntMember libexpat.so.1 is not fou
d in archive nCould not load module /wload/es1p/app/perl/lib/site_perl/5.10.1/aix/auto/XML/Parser/Expat/Expat.so.ntDependent mod
le /wload/es1p/app/perl/lib/site_perl/5.10.1/aix/auto/XML/Parser/Expat/Expat.so could not be loaded. at /wload/es1p/app/perl/lib/5.
0.1/aix/DynaLoader.pm line 200.n at /wload/es1p/app/perl/lib/site_perl/5.10.1/aix/XML/Parser.pm line 18nCompilation failed in req
ire at /wload/es1p/app/perl/lib/site_perl/5.10.1/aix/XML/Parser.pm line 18.nBEGIN failed--compilation aborted at /wload/es1p/app/p
rl/lib/site_perl/5.10.1/aix/XML/Parser.pm line 22.nCompilation failed in require at /wload/es1p/app/perl/lib/site_perl/5.10.1/XML/
Path/XMLParser.pm line 7.nBEGIN failed--compilation aborted at /wload/es1p/app/perl/lib/site_perl/5.10.1/XML/XPath/XMLParser.pm li
e 7.nCompilation failed in require at /wload/es1p/app/perl/lib/site_perl/5.10.1/XML/XPath.pm line 13.nBEGIN failed--compilation a
orted at /wload/es1p/app/perl/lib/site_perl/5.10.1/XML/XPath.pm line 13.nCompilation failed in require at /wload/es1p/app/perl/lib
site_perl/5.10.1/Net/SAML2/IdP.pm line 23.nBEGIN failed--compilation aborted at /wload/es1p/app/perl/lib/site_perl/5.10.1/Net/SAML
/IdP.pm line 23.nCompilation failed in require at /wload/es1p/app/perl/lib/site_perl/5.10.1/Net/SAML2.pm line 69.nBEGIN failed--c
mpilation aborted at /wload/es1p/app/perl/lib/site_perl/5.10.1/Net/SAML2.pm line 69.nCompilation failed in require at /wload/es1p/
pp/usr/local/apache2/perl-bin/sso.pl line 4.nBEGIN failed--compilation aborted at /wload/es1p/app/usr/local/apache2/perl-bin/sso.pl
expat/expat-devel库是使用一个包(dev和live上的同一个包)安装到/opt/freeware/lib
中的,并且两者都显示来自ldd Expat.so
:的相同输出
Expat.so needs:
/usr/lib/libc.a(shr.o)
/opt/freeware/lib/libexpat.a(libexpat.so.1)
/unix
/usr/lib/libcrypt.a(shr.o)
我尝试在我们的点文件和mod_env配置中设置LIBPATH,但没有成功。我不希望有人知道确切的答案,但我已经没有办法尝试什么了,所以我希望能有一些建议来尝试。
编辑:我还应该指出,使用XML::Parser的同一脚本在我们的实时服务器上与普通的cgi-bin脚本一样完美。
有一个想法:也许在您的产品服务器上安装了两个不同的XML::Parser。你的CGI选择了一个,你的脚本选择了另一个?
从脚本(在prod和dev上)和工作CGI中打印出@INC,并比较结果。
问候,