安装 cpan 内联包时出现错误 255 和"couldn't find diagnostic data"



当我尝试通过 cpan> install Inline 使用 cpan 安装内联包时,最后出现以下错误:

make: *** [test_dynamic] Error 255
  SISYPHUS/Inline-0.53.tar.gz
  /opt/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports SISYPHUS/Inline-0.53.tar.gz
Running make install
  make test had returned bad status, won't install without force
Failed during this command:
 SISYPHUS/Inline-0.53.tar.gz                  : make_test NO

以下是完整的安装日志:

cpan[1]> install Inline
CPAN: Storable loaded ok (v2.18)
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
CPAN: Compress::Zlib loaded ok (v2.008)
CPAN: YAML loaded ok (v0.88)
Going to read /root/.cpan/build/
............................................................................DONE
Found 1 old build, restored the state of 1
............................................................................DONE
Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
  Database was generated on Wed, 08 Jan 2014 07:41:07 GMT
  HTTP::Date not available
..............
  New CPAN.pm version (v2.00) available.
  [Currently running version is v1.9205]
  You might want to try
    install CPAN
    reload cpan
  to both upgrade CPAN.pm and run the new version without leaving
  the current session.
CPAN: Time::HiRes loaded ok (v1.9711)
..............................................................DONE
Going to read /root/.cpan/sources/modules/03modlist.data.gz
............................................................................DONE
Going to write /root/.cpan/Metadata
Running install for module 'Inline'
Running make for S/SI/SISYPHUS/Inline-0.53.tar.gz
  Has already been unwrapped into directory /root/.cpan/build/Inline-0.53-gk9HIk
  Has already been made
Running make test
make[1]: Entering directory `/root/.cpan/build/Inline-0.53-gk9HIk/C'
make[1]: Leaving directory `/root/.cpan/build/Inline-0.53-gk9HIk/C'
PERL_DL_NONLAZY=1 /share/MD0_DATA/.qpkg/Optware/bin/perl5.10.0 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00init...............ok
t/01usages.............couldn't find diagnostic data in /opt/lib/perl5/5.10.0/pods/perldiag.pod blib/lib . /root/.cpan/build/Inline-0.53-gk9HIk/blib/lib /root/.cpan/build/Inline-0.53-gk9HIk/blib/arch /opt/lib/perl5/5.10.0/arm-linux /opt/lib/perl5/5.10.0 /opt/lib/perl5/site_perl/5.10.0/arm-linux /opt/lib/perl5/site_perl/5.10.0/arm-none-linux-gnueabi /opt/lib/perl5/site_perl/5.10.0 t/01usages.t at /opt/lib/perl5/5.10.0/diagnostics.pm line 268, <POD_DIAG> line 647.
Compilation failed in require at t/01usages.t line 5, <POD_DIAG> line 647.
BEGIN failed--compilation aborted at t/01usages.t line 5, <POD_DIAG> line 647.
t/01usages.............dubious
        Test returned status 9 (wstat 2304, 0x900)
t/02config.............couldn't find diagnostic data in /opt/lib/perl5/5.10.0/pods/perldiag.pod blib/lib . /root/.cpan/build/Inline-0.53-gk9HIk/blib/lib /root/.cpan/build/Inline-0.53-gk9HIk/blib/arch /opt/lib/perl5/5.10.0/arm-linux /opt/lib/perl5/5.10.0 /opt/lib/perl5/site_perl/5.10.0/arm-linux /opt/lib/perl5/site_perl/5.10.0/arm-none-linux-gnueabi /opt/lib/perl5/site_perl/5.10.0 t/02config.t at /opt/lib/perl5/5.10.0/diagnostics.pm line 268, <POD_DIAG> line 647.
Compilation failed in require at t/02config.t line 5, <POD_DIAG> line 647.
BEGIN failed--compilation aborted at t/02config.t line 5, <POD_DIAG> line 647.
t/02config.............dubious
        Test returned status 9 (wstat 2304, 0x900)
t/03errors.............couldn't find diagnostic data in /opt/lib/perl5/5.10.0/pods/perldiag.pod blib/lib . /root/.cpan/build/Inline-0.53-gk9HIk/blib/lib /root/.cpan/build/Inline-0.53-gk9HIk/blib/arch /opt/lib/perl5/5.10.0/arm-linux /opt/lib/perl5/5.10.0 /opt/lib/perl5/site_perl/5.10.0/arm-linux /opt/lib/perl5/site_perl/5.10.0/arm-none-linux-gnueabi /opt/lib/perl5/site_perl/5.10.0 t/03errors.t at /opt/lib/perl5/5.10.0/diagnostics.pm line 268, <POD_DIAG> line 647.
Compilation failed in require at t/03errors.t line 5, <POD_DIAG> line 647.
BEGIN failed--compilation aborted at t/03errors.t line 5, <POD_DIAG> line 647.
t/03errors.............dubious
        Test returned status 9 (wstat 2304, 0x900)
t/04create.............couldn't find diagnostic data in /opt/lib/perl5/5.10.0/pods/perldiag.pod blib/lib . /root/.cpan/build/Inline-0.53-gk9HIk/blib/lib /root/.cpan/build/Inline-0.53-gk9HIk/blib/arch /opt/lib/perl5/5.10.0/arm-linux /opt/lib/perl5/5.10.0 /opt/lib/perl5/site_perl/5.10.0/arm-linux /opt/lib/perl5/site_perl/5.10.0/arm-none-linux-gnueabi /opt/lib/perl5/site_perl/5.10.0 t/04create.t at /opt/lib/perl5/5.10.0/diagnostics.pm line 268, <POD_DIAG> line 647.
Compilation failed in require at t/04create.t line 5, <POD_DIAG> line 647.
BEGIN failed--compilation aborted at t/04create.t line 5, <POD_DIAG> line 647.
t/04create.............dubious
        Test returned status 9 (wstat 2304, 0x900)
t/05files..............couldn't find diagnostic data in /opt/lib/perl5/5.10.0/pods/perldiag.pod blib/lib . /root/.cpan/build/Inline-0.53-gk9HIk/blib/lib /root/.cpan/build/Inline-0.53-gk9HIk/blib/arch /opt/lib/perl5/5.10.0/arm-linux /opt/lib/perl5/5.10.0 /opt/lib/perl5/site_perl/5.10.0/arm-linux /opt/lib/perl5/site_perl/5.10.0/arm-none-linux-gnueabi /opt/lib/perl5/site_perl/5.10.0 t/05files.t at /opt/lib/perl5/5.10.0/diagnostics.pm line 268, <POD_DIAG> line 647.
Compilation failed in require at t/05files.t line 5, <POD_DIAG> line 647.
BEGIN failed--compilation aborted at t/05files.t line 5, <POD_DIAG> line 647.
t/05files..............dubious
        Test returned status 9 (wstat 2304, 0x900)
t/06rewrite_config.....ok
t/07rewrite2_config....ok
Failed Test  Stat Wstat Total Fail  List of Failed
-------------------------------------------------------------------------------
t/01usages.t    9  2304    ??   ??  ??
t/02config.t    9  2304    ??   ??  ??
t/03errors.t    9  2304    ??   ??  ??
t/04create.t    9  2304    ??   ??  ??
t/05files.t     9  2304    ??   ??  ??
Failed 5/8 test scripts. 0/5 subtests failed.
Files=8, Tests=5,  3 wallclock secs ( 2.30 cusr +  0.14 csys =  2.44 CPU)
Failed 5/8 test programs. 0/5 subtests failed.
make: *** [test_dynamic] Error 255
  SISYPHUS/Inline-0.53.tar.gz
  /opt/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports SISYPHUS/Inline-0.53.tar.gz
Running make install
  make test had returned bad status, won't install without force
Failed during this command:
 SISYPHUS/Inline-0.53.tar.gz                  : make_test NO

不幸的是,我是 cpan 和 perl 的新手,所以我不知道如何解决这个问题。我已经尝试重新安装perl但没有成功。如果这对您很重要,我将在我的QNAP NAS TS-419P+上运行它:

[~] # uname -a
Linux QNAP 2.6.33.2 #1 Fri Jul 26 04:41:05 CST 2013 armv5tel unknown

这是我正在使用的perl版本:

[~] # perl --version
This is perl, v5.10.0 built for arm-none-linux-gnueabi

正如DavidO所写,测试失败use diagnostics;您可以通过自己执行此行来检查这一点(perl -e 'use diagnostics;')。

diagnostics.pm尝试从perldiag.pod读取诊断消息(错误消息中提到)。看起来您的系统上缺少它。

因此,您需要使用该文件安装软件包(或以其他方式将其发送到与Perl对应的版本的指定路径)。 例如,在Cygwin中,它在perl_pods包中,你猜对了,默认情况下没有安装。

首先调查第一个错误始终是一个很好的做法。 在本例中,如下所示:

在 中找不到诊断数据 (从复制/粘贴中排除的路径长列表) 编译失败,要求在 t/01usages.t 第 5 行,

查看发行版的源代码,我们发现 t/01usages.t 的第 5 行是:

use diagnostics;

诊断编译指示是核心 Perl 发行版的一部分。 对于缺少必要文件的diagnostics表明问题在于您的Perl安装已损坏或不完整(这是"损坏"的子集最有可能在这里的原因)。 请先解决该问题。

Brian's Guide to Solve Any Perl Problem:"先解决第一个问题。 在这种情况下,我们发现问题与模块无关,而是与Perl安装的质量有关。

相关内容

最新更新