Perl 无法使用Cpan安装Archive::Zip
我正在尝试使用以下命令安装Archive::Zip:Perl 无法使用Cpan安装Archive::Zip,perl,cpan,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/A
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的o配置:
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。请尝试以下操作:
cpan -f Archive::Zip
我相信我在几周前遇到了这个问题,只是测试套件被破坏了。模块运行良好。YMMV您能否提供有关特定系统的更多信息?在您的例子中,错误表示缺少Test::MockModule。您可以尝试预先安装它,尽管它可能需要一些外部依赖。另一方面,我已经能够在Ubuntu中使用cpanm安装它而没有问题,所以我们需要更多的信息来重现这个问题。@jjmerlo补充道,仍然没有关于Perl版本或操作系统的线索。不管怎样,每当某个依赖项失败时,请尝试自行安装,以查看到底是什么问题。如果您使用的是Linux(您应该这样做),它可能是针对特定发行版预先打包的,这样就省去了安装外部依赖项的麻烦。在这种情况下,
libtest mockmodule perl-perl模块覆盖模块中的子例程进行单元测试。所以,尝试从操作系统repos安装它,如果失败,请执行cpan Test::MockModule,如果失败,它将为您提供问题的线索。@jjmerlo我实际上添加了我正在使用CentOS。无论如何都将尝试您的解决方案。请尝试以下操作:look Test::MockModule
,然后perl Build.PL