2012-10-08 114 views
2

我知道它缺少依賴關係,但我認爲CPAN會自動安裝所有依賴模塊。以下是錯誤:爲什麼安裝Scrappy時CPAN安裝失敗?

Test Summary Report 
------------------- 
t/00_load_scrappy.t     (Wstat: 65280 Tests: 1 Failed: 1) 
    Failed test: 1 
    Non-zero exit status: 255 
    Parse errors: Bad plan. You planned 12 tests but ran 1. 
t/00_test_function_back.t    (Wstat: 512 Tests: 0 Failed: 0) 
    Non-zero exit status: 2 
    Parse errors: No plan found in TAP output 
t/00_test_function_content.t   (Wstat: 512 Tests: 0 Failed: 0) 
    Non-zero exit status: 2 
    Parse errors: No plan found in TAP output 
t/00_test_function_control.t   (Wstat: 512 Tests: 0 Failed: 0) 
    Non-zero exit status: 2 
    Parse errors: No plan found in TAP output 
t/00_test_function_cookies.t   (Wstat: 512 Tests: 0 Failed: 0) 
    Non-zero exit status: 2 
    Parse errors: No plan found in TAP output 
t/00_test_function_crawl.t   (Wstat: 512 Tests: 0 Failed: 0) 
    Non-zero exit status: 2 
    Parse errors: No plan found in TAP output 
t/00_test_function_debug.t   (Wstat: 512 Tests: 0 Failed: 0) 
    Non-zero exit status: 2 
    Parse errors: No plan found in TAP output 
t/00_test_function_domain.t   (Wstat: 512 Tests: 0 Failed: 0) 
    Non-zero exit status: 2 
    Parse errors: No plan found in TAP output 
t/00_test_function_download.t   (Wstat: 512 Tests: 0 Failed: 0) 
    Non-zero exit status: 2 
    Parse errors: No plan found in TAP output 
t/01_load_scrappy.t     (Wstat: 65280 Tests: 1 Failed: 1) 
    Failed test: 1 
    Non-zero exit status: 255 
    Parse errors: Bad plan. You planned 8 tests but ran 1. 
Files=39, Tests=2, 1 wallclock secs (0.08 usr 0.08 sys + 0.85 cusr 0.15 csys = 1.16 CPU) 
Result: FAIL 
Failed 10/39 test programs. 2/2 subtests failed. 
make: *** [test_dynamic] Error 255 
    AWNCORP/Scrappy-0.94112090.tar.gz 
7 dependencies missing (String::TT,WWW::Mechanize,Web::Scraper,YAML::Syck,Template,HTML::TreeBuilder,Moose); additionally test harness failed 
    make test -- NOT OK 
//hint// to see the cpan-testers results for installing this module, try: 
    reports AWNCORP/Scrappy-0.94112090.tar.gz 
Running make install 
    make test had returned bad status, won't install without force 
Could not read metadata file. Falling back to other methods to determine prerequisites 
Failed during this command: 
ROBIN/PadWalker-1.96.tar.gz     : make NO 
ABW/Template-Toolkit-2.24.tar.gz    : make NO 
BOBTFISH/String-TT-0.03.tar.gz    : make_test NO 2 dependencies missing (PadWalker,Template); additionally test harness failed 
GAAS/HTML-Parser-3.69.tar.gz     : make NO 
CJM/HTML-Tree-5.03.tar.gz     : make_test NO 2 dependencies missing (HTML::Parser,HTML::Entities); additionally test harness failed 
MIROD/HTML-TreeBuilder-XPath-0.14.tar.gz  : make_test NO one dependency not OK (HTML::TreeBuilder); additionally test harness failed 
GAAS/libwww-perl-6.04.tar.gz     : make_test NO 2 dependencies missing (HTML::HeadParser,HTML::Entities); additionally test harness failed 
MIYAGAWA/Web-Scraper-0.36.tar.gz    : make_test NO 4 dependencies missing (HTML::TreeBuilder::XPath,HTML::Entities,HTML::TreeBuilder,LWP); additionally test harness failed 
DOY/Package-Stash-XS-0.25.tar.gz    : make NO 
DROLSKY/Class-Load-XS-0.04.tar.gz   : make NO 
DOY/Moose-2.0604.tar.gz      : make NO 
GAAS/HTML-Form-6.03.tar.gz     : make_test NO one dependency not OK (HTML::TokeParser); additionally test harness failed 
JESSE/WWW-Mechanize-1.72.tar.gz    : make_test NO 7 dependencies missing (HTML::Form,LWP::UserAgent,HTML::TokeParser,HTML::Parser,HTML::HeadParser,HTML::TreeBuilder,LWP); additionally test harness failed 
TODDR/YAML-Syck-1.21.tar.gz     : writemakefile NO '/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 512 
AWNCORP/Scrappy-0.94112090.tar.gz   : make_test NO 7 dependencies missing (String::TT,WWW::Mechanize,Web::Scraper,YAML::Syck,Template,HTML::TreeBuilder,Moose); additionally test harness failed 

然後我試圖安裝單獨依賴模塊之一:

cpan[2]> install PadWalker 
Running install for module 'PadWalker' 
Running make for R/RO/ROBIN/PadWalker-1.96.tar.gz 
    Has already been unwrapped into directory /root/.cpan/build/PadWalker-1.96-n6C9km 
Could not make: Unknown error 
Running make test 
    Can't test without successful make 
Running make install 
    Make had returned bad status, install seems impossible 

有人能指出我在正確的方向?我是root,它是迄今爲止最新的Ubuntu 12.04.1。

回答

3

可以用CPAN安裝Scrappy。在我的情況只有穆斯必須被迫(失敗的1/382測試程序0/18150分測試失敗)。

cpan[6]> force install Moose 
[...] 

cpan[7]> install Scrappy 
Running install for module 'Scrappy' 
Running make for A/AW/AWNCORP/Scrappy-0.94112090.tar.gz 

[...] 
Installing /home/david/perl5/bin/scrappy 
Appending installation info to /home/david/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod 

    AWNCORP/Scrappy-0.94112090.tar.gz 
    /usr/bin/make install -- OK 


你應該嘗試手動安裝PadWalker找出背後是什麼Could not make: Unknown error的原因。


在我的情況PadWalker可以從~/.cpan/build/PadWalker-1.96-XW0Mq2安裝如下:

的perl Makefile.PL

Checking if your kit is complete... 
Looks good 
Writing Makefile for PadWalker 
Writing MYMETA.yml 

使

cp PadWalker.pm blib/lib/PadWalker.pm 
/usr/bin/perl /usr/share/perl/5.14/ExtUtils/xsubpp -typemap /usr/share/perl/5.14/ExtUtils/typemap PadWalker.xs > PadWalker.xsc && mv PadWalker.xsc PadWalker.c 
cc -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.96\" -DXS_VERSION=\"1.96\" -fPIC "-I/usr/lib/perl/5.14/CORE" PadWalker.c 
[...] 
chmod 755 blib/arch/auto/PadWalker/PadWalker.so 
cp PadWalker.bs blib/arch/auto/PadWalker/PadWalker.bs 
chmod 644 blib/arch/auto/PadWalker/PadWalker.bs 
Manifying blib/man3/PadWalker.3pm 

化妝測試

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0,  'blib/lib', 'blib/arch')" t/*.t 
t/closure.t ... ok  
t/dm.t ........ ok 
[...] 
Result: PASS 

使安裝

Files found in blib/arch: installing files in blib/lib into architecture dependent library tree 
Installing /home/david/perl5/man/man3/PadWalker.3pm 
Appending installation info to /home/david/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod 
+0

謝謝你,強制安裝在廢材CPAN工作。 – Mike