Perl:安装 CPAN 模块时出错

发布于 2024-09-13 18:38:24 字数 996 浏览 6 评论 0原文

我在 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

你有解决方案吗?

I run on Mac OS X 10.5 and I want to write a program in Perl. However, I need to install the module RDF::Trine and DBD::CSV and I got an error when I install both.

If I write :

install RDF::Trine

The error is :

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

And the error for the installation of DBD::CSV is :

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

Do you have a solution for me?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

酷到爆炸 2024-09-20 18:38:24

您能否发布以下内容的输出:

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)

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

通过运行 o conf prescriptives_policy 确认设置,如果它设置为 ask 以外的任何内容,请运行:(

o conf prerequisites_policy ask
o conf commit

这些是小写字母“oh”)

然后重复您的 cpan 命令。

Can you post the output of:

cpan RDF::Trine

or even

cpan Bundle::CPAN

A LOT of perl developers develop on MacOS. I'd be surprised if it didn't work out of the box.

Updated, easier to read cpan output here than in a comment. It looks like your cpan is set to ignore dependencies:

---- 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 is the configuration variable that controls this behavior.

Confirm the setting by running o conf prerequisites_policy and if it's set to anything other than ask, run:

o conf prerequisites_policy ask
o conf commit

(Those are lowercase letter "oh")

Then repeat your cpan commands.

陌伤ぢ 2024-09-20 18:38:24

您可以强制安装perl模块

perl –MCPAN –e'强制安装“RDF::Trine”'

其中 RDF::Trine 是模块名称

You can install perl module forcefully

perl –MCPAN –e’force install “RDF::Trine”’

Where RDF::Trine is the module name

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文