简体   繁体   English

Perl CPAN模块的依赖性问题

[英]Dependency problem of Perl CPAN modules

I tried to install SOAP::WSDL on Ubuntu 8.04 Server through CPAN but got the following error message: 我尝试通过CPAN在Ubuntu 8.04服务器上安装SOAP::WSDL ,但收到以下错误消息:

cpan> install SOAP::WSDL
Running install for module SOAP::WSDL
Running make for M/MK/MKUTTER/SOAP-WSDL-2.00.10.tar.gz
Checksum for /root/.cpan/sources/authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00.10.tar.gz ok
SOAP-WSDL-2.00.10/
SOAP-WSDL-2.00.10/benchmark/
(skipped many lines)
SOAP-WSDL-2.00.10/README

  CPAN.pm: Going to build M/MK/MKUTTER/SOAP-WSDL-2.00.10.tar.gz

# running Build.PL --installdirs site
Creating new 'MYMETA.yml' with configuration results
Creating new 'Build' script for 'SOAP-WSDL' version '2.00.10'
Prereq '0.0.5' for 'Class::Std::Fast' is not supported by Module::Build::Compat
Running make test
  Make had some problems, maybe interrupted? Won't test
Running make install
  Make had some problems, maybe interrupted? Won't install

I have the latest versions of Class::Std::Fast and Module::Build::Compat : 我有Class::Std::FastModule::Build::Compat的最新版本:

$ perl -MModule::Build::Compat -e 'print $Module::Build::Compat::VERSION;'
0.3607
$ perl -MClass::Std::Fast -e 'print $Class::Std::Fast::VERSION;'
0.0.8

Any idea how to solve the problem? 知道如何解决问题吗? Perhaps I need to downgrade Class::Std::Fast to version 0.0.5? 也许我需要将Class::Std::Fast降级到0.0.5版?

Long story short, it looks like your CPAN installation is preferring to use the compatibility Makefile.PL instead of the Build.PL. 长话短说,您的CPAN安装似乎更喜欢使用兼容性Makefile.PL而不是Build.PL。 It should prefer the Build.PL. 它应该更喜欢Build.PL。 The Makefile.PLs were intended for compatibility only and may not have all the features of Module::Build, such as supporting three part versions. Makefile.PLs仅用于兼容性,可能不具有Module :: Build的所有功能,例如支持三个部分的版本。

Fire up cpan . 启动cpan o conf will let you see your configuration. o conf将让您看到您的配置。 If prefer_installer isn't set to MB then do o conf prefer_installer MB . 如果没有将prefer_installer设置为MB,则请o conf prefer_installer MB You may have to o conf commit to save it (it will tell you). 您可能需要确认o conf commit以保存它(它将告诉您)。 You may also have to install Module::Build, either from the libmodule-build-perl package or from CPAN. 您可能还必须从libmodule-build-perl软件包或CPAN安装Module :: Build。

Bug reported to SOAP::WSDL . 错误报告给SOAP :: WSDL

PS You can work around this by installing Class::Std::Fast first, download SOAP::WSDL manually, edit the Build.PL to remove that dependency, and run cpan . PS您可以通过以下方法解决此问题:首先安装Class :: Std :: Fast,手动下载SOAP :: WSDL,编辑Build.PL以删除该依赖项,然后运行cpan . in SOAP::WSDL's directory to install it and its deps. 在SOAP :: WSDL的目录中安装它及其dep。

What is your CPAN version? 您的CPAN版本是什么? And configuration? 和配置? ( o conf at the cpan shell prompt.) o conf在cpan shell提示符下显示o conf 。)

Hmm, that all looks ok. 嗯,一切都还好。 Unless for some reason CPAN wasn't able to load Module::Build? 除非出于某种原因,CPAN无法加载Module :: Build? Can you try the install again from a fresh CPAN shell, with no previous commands? 您可以在没有先前命令的情况下从新的CPAN Shell再次尝试安装吗?

Or try doing a manual install without using CPAN.pm? 还是尝试不使用CPAN.pm进行手动安装?

Try it, 试试吧,

cpan Module::Build

and

cpan Module::Build::Compat

And I forget to say something, the Ubuntu modify the packages if you are trying to install modules with root user, forget. 我忘了说些什么,如果您尝试以root用户身份安装模块,Ubuntu会修改软件包,算了。 Try again with local::lib . 使用local::lib再试一次。

After you do it, do: 完成后,请执行以下操作:

cpan install CPAN

and finally, 最后,

cpan upgrade

It should solve your problem. 它应该解决你的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM