无法为模块XML :: LibXML加载'C:/strawberry/perl/site/lib/auto/XML/LibXML/LibXML.dll' [英] Can't load 'C:/strawberry/perl/site/lib/auto/XML/LibXML/LibXML.dll' for module XML::LibXML
问题描述
我已经下载了草莓PERL,并在Winxp sp3上使用CGI Perl Apache编写了一个应用程序.
我使用的其中一个库(由其他人编写)使用XML :: LibXML.当我加载页面时,它给出了内部服务器错误.从Apache错误日志中,我可以看到此错误:
无法为模块XML :: LibXML:load_file:加载'C:/strawberry/perl/site/lib/auto/XML/LibXML/LibXML.dll'在C:/strawberry中找不到指定的模块/perl/lib/DynaLoader.pm第190行.
C:/strawberry/perl/site/lib/auto/XML/LibXML/LibXML.dll存在所有权限.
此外,该库在Linux上也可以正常工作.如果删除所有需要LibXML的代码,我的应用程序也可以正常工作.
谁能告诉我何时可能出现问题.
I have downloaded strawberry PERL and writing one application with CGI Perl Apache on Winxp sp3).
One of the libraries (written by someone else) which I using uses XML::LibXML. When i load the page it gives Internal Server Error. From Apache error log i can see this error:
Can't load 'C:/strawberry/perl/site/lib/auto/XML/LibXML/LibXML.dll' for module XML::LibXML: load_file:The specified module could not be found at C:/strawberry/perl/lib/DynaLoader.pm line 190.
C:/strawberry/perl/site/lib/auto/XML/LibXML/LibXML.dll exists with all permissions.
Also this library works properly on Linux. My application also works fine if I remove all code that needs LibXML.
Can anyone tell me when can be possible issue here.
推荐答案
如果您查看DynaLoader的源代码,将会找到
If you peek into the source for DynaLoader you'll find
许多动态扩展加载问题似乎来自 此段代码:XYZ在DynaLoader.pm的第123行失败. 这些错误通常是在初始化时实际发生的 扩展名XS文件的C代码. Perl报告错误为 在此Perl代码中,仅仅是因为这是最后一个Perl代码 它执行了.
Many dynamic extension loading problems will appear to come from this section of code: XYZ failed at line 123 of DynaLoader.pm. Often these errors are actually occurring in the initialisation C code of the extension XS file. Perl reports the error as being in this perl code simply because this was the last perl code it executed.
您还应该获得(但可能没有注意到)以下对话框,该对话框提供了更准确的错误消息:
You should have also gotten (but may not have noticed) the following dialog, which provides a more accurate error message:
问题不是perl找不到LibXML.dll.那是LibXML.dll找不到真正的libxml. (前者只是为后者提供Perl绑定的包装器.)要解决此问题,您需要确保Strawberry Perl的c\bin
文件夹位于PATH中.您的情况就是C:\strawberry\c\bin
.
The problem isn't that perl can't find LibXML.dll; it's that LibXML.dll can't find the real libxml. (The former is just a wrapper that provides Perl bindings for the latter.) To fix that you need to ensure that Strawberry Perl's c\bin
folder is in your PATH. In your case, that would be C:\strawberry\c\bin
.
这篇关于无法为模块XML :: LibXML加载'C:/strawberry/perl/site/lib/auto/XML/LibXML/LibXML.dll'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!