无法使用Cpan安装Archive :: Zip

时间:2016-08-10 07:55:51

标签: perl cpan

我正在尝试使用以下命令安装Archive :: Zip:

cpan[3]> install Archive::Zip

然而它永远不会被安装。我不知道下一步该做什么。这是我得到的日志:

Running install for module 'Archive::Zip'
Running make for P/PH/PHRED/Archive-Zip-1.58.tar.gz
  Has already been unwrapped into directory /root/.cpan/build/Archive-Zip-1.58-1OzAcc
---- Unsatisfied dependencies detected during ----
----       PHRED/Archive-Zip-1.58.tar.gz      ----
    Test::MockModule [requires]
Running make test
  Delayed until after prerequisites
Running make install
  make test had returned bad status, won't install without force
  Delayed until after prerequisites
Running install for module 'Test::MockModule'
Running Build for G/GF/GFRANKS/Test-MockModule-0.11.tar.gz
  Has already been unwrapped into directory /root/.cpan/build/Test-MockModule-0.11-_LrG4F
  '/usr/bin/perl Build.PL ' returned status 512, won't make
Running Build test
  Make had some problems, won't test
Running Build install
  Make had some problems, won't install
Running make for P/PH/PHRED/Archive-Zip-1.58.tar.gz
  Has already been unwrapped into directory /root/.cpan/build/Archive-Zip-1.58-1OzAcc
Warning: Prerequisite 'Test::MockModule => 0' for 'PHRED/Archive-Zip-1.58.tar.gz' failed when processing 'GFRANKS/Test-MockModule-0.11.tar.gz' with 'writemakefile => NO '/usr/bin/perl Build.PL ' returned status 512'. Continuing, but chances to succeed are limited.
  Has already been made
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01_compile.t ................ ok
t/02_main.t ................... ok
t/03_ex.t ..................... ok
t/04_readmember.t ............. ok
t/05_tree.t ................... ok
t/06_update.t ................. ok
t/07_filenames_of_0.t ......... ok
t/08_readmember_record_sep.t .. ok
t/09_output_record_sep.t ...... ok
t/10_chmod.t .................. ok
t/11_explorer.t ............... ok
t/12_bug_47223.t .............. skipped: Only required on Win32.
t/13_bug_46303.t .............. ok
t/14_leading_separator.t ...... ok
t/15_decrypt.t ................ ok
t/16_decrypt.t ................ ok
t/17_101092.t ................. ok
t/18_bug_92205.t .............. ok
t/19_bug_101240.t ............. ok
t/20_bug_github11.t ........... ok
t/21_zip64.t .................. ok
t/22_deflated_dir.t ........... ok
t/23_closed_handle.t .......... Can't locate Test/MockModule.pm in @INC (@INC contains: /root/.cpan/build/Archive-Zip-1.58-1OzAcc/blib/lib /root/.cpan/build/Archive-Zip-1.58-1OzAcc/blib/arch /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at t/23_closed_handle.t line 9.
BEGIN failed--compilation aborted at t/23_closed_handle.t line 9.
t/23_closed_handle.t .......... Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
t/24_unicode_win32.t .......... ok

以下是安装后的测试摘要:

Test Summary Report
-------------------
t/23_closed_handle.t        (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
Files=24, Tests=302,  2 wallclock secs ( 0.07 usr  0.01 sys +  1.72 cusr  0.28 csys =  2.08 CPU)
Result: FAIL
Failed 1/24 test programs. 0/302 subtests failed.
make: *** [test_dynamic] Error 255
  PHRED/Archive-Zip-1.58.tar.gz
one dependency not OK (Test::MockModule); additionally test harness failed
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports PHRED/Archive-Zip-1.58.tar.gz
Running make install
  make test had returned bad status, won't install without force
Failed during this command:
 PHRED/Archive-Zip-1.58.tar.gz                : make_test NO one dependency not OK (Test::MockModule); additionally test harness failed

这是我的cpan.pm:

cpan[2]> o conf
$CPAN::Config options from /root/.cpan/CPAN/MyConfig.pm:
    commit             [Commit changes to disk]
    defaults           [Reload defaults from disk]
    help               [Short help about 'o conf' usage]
    init               [Interactive setting of all options]

    applypatch         []
    auto_commit        [0]
    build_cache        [100]
    build_dir          [/root/.cpan/build]
    build_dir_reuse    [0]
    build_requires_install_policy [yes]
    bzip2              [/usr/bin/bzip2]
    cache_metadata     [1]
    check_sigs         [0]
    colorize_debug     undef
    colorize_output    undef
    colorize_print     undef
    colorize_warn      undef
    commandnumber_in_prompt [1]
    commands_quote     undef
    connect_to_internet_ok [1]
    cpan_home          [/root/.cpan]
    curl               undef
    dontload_hash      undef
    dontload_list      undef
    ftp                undef
    ftp_passive        [1]
    ftp_proxy          []
    ftpstats_period    undef
    ftpstats_size      undef
    getcwd             [cwd]
    gpg                [/usr/bin/gpg]
    gzip               [/usr/bin/gzip]
    halt_on_failure    [0]
    histfile           [/root/.cpan/histfile]
    histsize           [100]
    http_proxy         []
    inactivity_timeout [0]
    index_expire       [1]
    inhibit_startup_message [0]
    keep_source_where  [/root/.cpan/sources]
    load_module_verbosity [none]
    lynx               undef
    make               [/usr/bin/make]
    make_arg           []
    make_install_arg   []
    make_install_make_command [sudo /usr/bin/make]
    makepl_arg         []
    mbuild_arg         []
    mbuild_install_arg []
    mbuild_install_build_command [sudo ./Build]
    mbuildpl_arg       []
    ncftp              undef
    ncftpget           undef
    no_proxy           []
    pager              [/usr/bin/less]
    password           undef
    patch              []
    patches_dir        undef
    perl5lib_verbosity [none]
    prefer_external_tar [1]
    prefer_installer   [MB]
    prefs_dir          [/root/.cpan/prefs]
    prerequisites_policy [follow]
    proxy_pass         undef
    proxy_user         undef
    randomize_urllist  undef
    scan_cache         [atstart]
    shell              [/bin/bash]
    show_unparsable_versions [0]
    show_upload_date   [0]
    show_zero_versions [0]
    tar                [/usr/bin/tar]
    tar_verbosity      [none]
    term_is_latin      [1]
    term_ornaments     [1]
    test_report        [0]
    trust_test_report_history [0]
    unzip              [/usr/bin/unzip]
    urllist
        0 [http://cpan.perl-hackers.net/]
        1 [http://download.xs4all.nl/CPAN/]
        2 [http://cpan.mirrors.uk2.net/]
    use_sqlite         [0]
    username           undef
    version_timeout    [15]
    wait_list          undef
    wget               [/usr/bin/wget]
    yaml_load_code     [0]
    yaml_module        [YAML]

我正在使用CentOS。

1 个答案:

答案 0 :(得分:12)

试试这个:

cpan -f Archive::Zip

我相信几个星期前我遇到了这个问题,而这只是被破坏的测试套件。该模块工作正常。 YMMV