ubuntu安装perl模块的问题cpan AnyEvent::HTTP Data::Dumper JSON

软件和网站开发以及相关技术探讨
回复
头像
九天星
帖子: 1440
注册时间: 2007-07-14 20:45

ubuntu安装perl模块的问题cpan AnyEvent::HTTP Data::Dumper JSON

#1

帖子 九天星 » 2017-09-27 22:25

系统版本:ubuntu16.04LTS

软件安装提示:
Here are the steps to install and run it:

make sure perl and cpan are installed.
Install perl packages by
cpan AnyEvent::HTTP Data::Dumper JSON

于是,我在终端下切换到root权限后使用命令

代码: 全选

cpan AnyEvent::HTTP Data::Dumper JSON
进行安装,安装过程提示:

t/81_hosts.t ............... 1/2
# Failed test 'resolved on first attempt'
# at t/81_hosts.t line 29.
# got: '220.250.64.225'
# expected: '127.9.9.9'

# Failed test 'resolved on second attempt'
# at t/81_hosts.t line 30.
# got: '220.250.64.225'
# expected: '127.9.9.9'
# Looks like you failed 2 tests of 2.
t/81_hosts.t ............... Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/2 subtests
t/handle/01_readline.t ..... ok
t/handle/02_write.t ........ ok
t/handle/03_http_req.t ..... skipped: PERL_ANYEVENT_NET_TESTS environment variable not set
t/handle/04_listen.t ....... ok

Test Summary Report
-------------------
t/81_hosts.t (Wstat: 512 Tests: 2 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 2
Files=82, Tests=665, 8 wallclock secs ( 0.33 usr 0.10 sys + 1.76 cusr 0.10 csys = 2.29 CPU)
Result: FAIL
Failed 1/82 test programs. 2/665 subtests failed.
Makefile:1013: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 255
MLEHMANN/AnyEvent-7.14.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports MLEHMANN/AnyEvent-7.14.tar.gz
MLEHMANN/AnyEvent-HTTP-2.23.tar.gz
Has already been unwrapped into directory /root/.local/share/.cpan/build/AnyEvent-HTTP-2.23-td4Mno
MLEHMANN/AnyEvent-HTTP-2.23.tar.gz
Has already been prepared
Running make for M/ML/MLEHMANN/AnyEvent-HTTP-2.23.tar.gz
Warning: Prerequisite 'AnyEvent => 5.33' for 'MLEHMANN/AnyEvent-HTTP-2.23.tar.gz' failed when processing 'MLEHMANN/AnyEvent-7.14.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited.
CPAN: Time::HiRes loaded ok (v1.9726)
cp HTTP.pm blib/lib/AnyEvent/HTTP.pm
Manifying 1 pod document
MLEHMANN/AnyEvent-HTTP-2.23.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_load.t ......... Can't locate AnyEvent.pm in @INC (you may need to install the AnyEvent module) (@INC contains: /root/.local/share/.cpan/build/AnyEvent-HTTP-2.23-td4Mno/blib/lib /root/.local/share/.cpan/build/AnyEvent-HTTP-2.23-td4Mno/blib/arch /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /root/.local/share/.cpan/build/AnyEvent-HTTP-2.23-td4Mno/blib/lib/AnyEvent/HTTP.pm line 45.
BEGIN failed--compilation aborted at /root/.local/share/.cpan/build/AnyEvent-HTTP-2.23-td4Mno/blib/lib/AnyEvent/HTTP.pm line 45.
Compilation failed in require at t/00_load.t line 3.
BEGIN failed--compilation aborted at t/00_load.t line 3.
t/00_load.t ......... Dubious, test returned 2 (wstat 512, 0x200)
Failed 1/1 subtests
t/01_basic.t ........ Can't locate AnyEvent/Impl/Perl.pm in @INC (you may need to install the AnyEvent::Impl::Perl module) (@INC contains: /root/.local/share/.cpan/build/AnyEvent-HTTP-2.23-td4Mno/blib/lib /root/.local/share/.cpan/build/AnyEvent-HTTP-2.23-td4Mno/blib/arch /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at t/01_basic.t line 3.
BEGIN failed--compilation aborted at t/01_basic.t line 3.
t/01_basic.t ........ Dubious, test returned 2 (wstat 512, 0x200)
Failed 4/4 subtests
t/02_ip_literals.t .. Can't locate AnyEvent/Impl/Perl.pm in @INC (you may need to install the AnyEvent::Impl::Perl module) (@INC contains: /root/.local/share/.cpan/build/AnyEvent-HTTP-2.23-td4Mno/blib/lib /root/.local/share/.cpan/build/AnyEvent-HTTP-2.23-td4Mno/blib/arch /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at t/02_ip_literals.t line 3.
BEGIN failed--compilation aborted at t/02_ip_literals.t line 3.
t/02_ip_literals.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 23/23 subtests

Test Summary Report
-------------------
t/00_load.t (Wstat: 512 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 2
t/01_basic.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: Bad plan. You planned 4 tests but ran 0.
t/02_ip_literals.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: Bad plan. You planned 23 tests but ran 0.
Files=3, Tests=1, 0 wallclock secs ( 0.02 usr + 0.00 sys = 0.02 CPU)
Result: FAIL
Failed 3/3 test programs. 1/1 subtests failed.
Makefile:818: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 2
MLEHMANN/AnyEvent-HTTP-2.23.tar.gz
one dependency not OK (AnyEvent); additionally test harness failed
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports MLEHMANN/AnyEvent-HTTP-2.23.tar.gz


当时我也没细看,即开始执行

代码: 全选

perl iotScanner.pl 210.3.19.0-201.3.100.254
却出现错误如下:

Can't locate AnyEvent/HTTP.pm in @INC (you may need to install the AnyEvent::HTTP module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at iotScanner.pl line 1.
BEGIN failed--compilation aborted at iotScanner.pl line 1.

不知道怎么解决这个错误,请教!!!
onlylove
论坛版主
帖子: 5214
注册时间: 2007-01-14 16:23

Re: ubuntu安装perl模块的问题cpan AnyEvent::HTTP Data::Dumper JSON

#2

帖子 onlylove » 2017-09-27 23:24

当时没仔细看,现在可以仔细看了吧? :Hehe
Makefile:818: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 2
头像
九天星
帖子: 1440
注册时间: 2007-07-14 20:45

Re: ubuntu安装perl模块的问题cpan AnyEvent::HTTP Data::Dumper JSON

#3

帖子 九天星 » 2017-09-28 11:28

onlylove 写了:当时没仔细看,现在可以仔细看了吧? :Hehe
Makefile:818: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 2
现在仔细看了还是不知道咋办 :Cry :Cry
回复