Perl:在CPAN上安装模块时出错

时间:2010-08-12 19:18:24

标签: perl csv installation rdf cpan

我在Mac OS X 10.5上运行,我想在Perl中编写程序。但是,我需要安装模块RDF::TrineDBD::CSV,并且在安装模块时出错。

如果我写:

install RDF::Trine

错误是:

Files=51, Tests=5,  2 wallclock secs ( 0.21 usr  0.18 sys +  1.30 cusr  0.51 csys =  2.20 CPU)
Result: FAIL
Failed 49/51 test programs. 5/5 subtests failed.
make: *** [test_dynamic] Error 2
  /usr/bin/make test -- NOT OK
Running make install
  make test had returned bad status, won't install without force

安装DBD :: CSV的错误是:

Files=21, Tests=18,  1 wallclock secs ( 0.10 usr  0.08 sys +  0.85 cusr  0.26 csys =  1.29 CPU)
Result: FAIL
Failed 16/21 test programs. 2/18 subtests failed.
make: *** [test_dynamic] Error 255
  /usr/bin/make test -- NOT OK
Running make install
  make test had returned bad status, won't install without force

你有解决方案吗?

2 个答案:

答案 0 :(得分:2)

你能发布以下的输出:

cpan RDF::Trine

甚至

cpan Bundle::CPAN

很多的perl开发人员在MacOS上开发。如果没有开箱即用,我会感到惊讶。

此处更新,更容易阅读cpan输出,而不是评论。看起来您的cpan设置为忽略依赖项:

---- Unsatisfied dependencies detected during ----
----     GWILLIAMS/RDF-Trine-0.125.tar.gz     ----
    Text::Table [requires]
    DBD::SQLite [requires]
    XML::LibXML::SAX [requires]
    Unicode::Escape [requires]
    Unicode::String [requires]
    Text::CSV [requires]
    Error [requires]
    Test::Exception [requires]
    Test::JSON [requires]
    XML::Namespace [requires]
    Data::UUID [requires]
    Math::Combinatorics [requires]
    Set::Scalar [requires]
    XML::CommonNS [requires]
    XML::LibXML [requires]
    JSON [requires]
    Log::Log4perl [requires]
  Ignoring dependencies on modules ARRAY(0x4d22268), ARRAY(0x5463770), ARRAY(0x4d1bbe4), ARRAY(0x4d22724), ARRAY(0x4d21fc8), ARRAY(0x4d226c4), ARRAY(0x4d21fa4), ARRAY(0x5463830), ARRAY(0x5463878), ARRAY(0x4d24cf0), ARRAY(0x4d22784), ARRAY(0x4d21f74), ARRAY(0x4d21f5c), ARRAY(0x4d21e3c), ARRAY(0x4d21ee4), ARRAY(0x4d21d4c), ARRAY(0x4d21e84), ARRAY(0x4d21c80), ARRAY(0x4d21efc), ARRAY(0x4d2219c), ARRAY(0x4d21fb0), ARRAY(0x4d2213c), ARRAY(0x4d21ddc), ARRAY(0x4d2264c), ARRAY(0x4d21ed8), ARRAY(0x5463818), ARRAY(0x4d21d94), ARRAY(0x4d22640), ARRAY(0x4d21de8), ARRAY(0x4d1bb00), ARRAY(0x4d21c98), ARRAY(0x4d2225c), ARRAY(0x4d21f68), ARRAY(0x4d22334)

prerequisites_policy是控制此行为的配置变量。

运行o conf prerequisites_policy确认设置,如果设置为ask以外的其他设置,请运行:

o conf prerequisites_policy ask
o conf commit

(那些是小写字母“哦”)

然后重复你的cpan命令。

答案 1 :(得分:0)

您可以强制安装perl模块

  

perl -MCPAN -e'force install“RDF :: Trine”'

RDF :: Trine 是模块名称