2012-08-23 60 views
0

我试图安装使用Perl从命令行一些图书馆安装包:使用CPAN的Perl

perl -MCPAN -e "install XML::Tidy" 

不过,我不能够:

Warning (usually harmless): 'YAML' not installed, will not store persistent state 
Running Build test 
t\00pod.t ..... ok 
t\00podc.t .... Can't locate Test/Pod/Coverage.pm in @INC (@INC contains: C:\xam 
pp\perl\bin\.cpan\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\lib C:\xampp\perl\bin\ 
.cpan\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\arch C:/xampp/perl/lib C:/xampp/pe 
rl/site/lib .) at t\00podc.t line 1. 
BEGIN failed--compilation aborted at t\00podc.t line 1. 
t\00podc.t .... Dubious, test returned 2 (wstat 512, 0x200) 
No subtests run 
t\00small.t ... Base class package "XML::XPath" is empty. 
    (Perhaps you need to 'use' the module which defines that package first, 
    or make that module available in @INC (@INC contains: C:\xampp\perl\bin\.cpa 
n\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\lib C:\xampp\perl\bin\.cpan\build\XML- 
Tidy-1.12.B55J2qn-y5sVpz\blib\arch C:/xampp/perl/lib C:/xampp/perl/site/lib .). 
at C:\xampp\perl\bin\.cpan\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\lib/XML/Tidy 
.pm line 5 
BEGIN failed--compilation aborted at C:\xampp\perl\bin\.cpan\build\XML-Tidy-1.12 
.B55J2qn-y5sVpz\blib\lib/XML/Tidy.pm line 5. 
Compilation failed in require at t\00small.t line 3. 
BEGIN failed--compilation aborted at t\00small.t line 3. 
t\00small.t ... Dubious, test returned 2 (wstat 512, 0x200) 
Failed 15/15 subtests 
t\01medium.t .. Base class package "XML::XPath" is empty. 
    (Perhaps you need to 'use' the module which defines that package first, 
    or make that module available in @INC (@INC contains: C:\xampp\perl\bin\.cpa 
n\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\lib C:\xampp\perl\bin\.cpan\build\XML- 
Tidy-1.12.B55J2qn-y5sVpz\blib\arch C:/xampp/perl/lib C:/xampp/perl/site/lib .). 
at C:\xampp\perl\bin\.cpan\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\lib/XML/Tidy 
.pm line 5 
BEGIN failed--compilation aborted at C:\xampp\perl\bin\.cpan\build\XML-Tidy-1.12 
.B55J2qn-y5sVpz\blib\lib/XML/Tidy.pm line 5. 
Compilation failed in require at t\01medium.t line 3. 
BEGIN failed--compilation aborted at t\01medium.t line 3. 
t\01medium.t .. Dubious, test returned 2 (wstat 512, 0x200) 
Failed 15/15 subtests 
t\02large.t ... Base class package "XML::XPath" is empty. 
    (Perhaps you need to 'use' the module which defines that package first, 
    or make that module available in @INC (@INC contains: C:\xampp\perl\bin\.cpa 
n\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\lib C:\xampp\perl\bin\.cpan\build\XML- 
Tidy-1.12.B55J2qn-y5sVpz\blib\arch C:/xampp/perl/lib C:/xampp/perl/site/lib .). 
at C:\xampp\perl\bin\.cpan\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\lib/XML/Tidy 
.pm line 5 
BEGIN failed--compilation aborted at C:\xampp\perl\bin\.cpan\build\XML-Tidy-1.12 
.B55J2qn-y5sVpz\blib\lib/XML/Tidy.pm line 5. 
Compilation failed in require at t\02large.t line 3. 
BEGIN failed--compilation aborted at t\02large.t line 3. 
t\02large.t ... Dubious, test returned 2 (wstat 512, 0x200) 
Failed 15/15 subtests 
t\03prune.t ... Base class package "XML::XPath" is empty. 
    (Perhaps you need to 'use' the module which defines that package first, 
    or make that module available in @INC (@INC contains: C:\xampp\perl\bin\.cpa 
n\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\lib C:\xampp\perl\bin\.cpan\build\XML- 
Tidy-1.12.B55J2qn-y5sVpz\blib\arch C:/xampp/perl/lib C:/xampp/perl/site/lib .). 
at C:\xampp\perl\bin\.cpan\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\lib/XML/Tidy 
.pm line 5 
BEGIN failed--compilation aborted at C:\xampp\perl\bin\.cpan\build\XML-Tidy-1.12 
.B55J2qn-y5sVpz\blib\lib/XML/Tidy.pm line 5. 
Compilation failed in require at t\03prune.t line 3. 
BEGIN failed--compilation aborted at t\03prune.t line 3. 
t\03prune.t ... Dubious, test returned 2 (wstat 512, 0x200) 
Failed 15/15 subtests 

Test Summary Report 
------------------- 
t\00podc.t (Wstat: 512 Tests: 0 Failed: 0) 
    Non-zero exit status: 2 
    Parse errors: No plan found in TAP output 
t\00small.t (Wstat: 512 Tests: 0 Failed: 0) 
    Non-zero exit status: 2 
    Parse errors: Bad plan. You planned 15 tests but ran 0. 
t\01medium.t (Wstat: 512 Tests: 0 Failed: 0) 
    Non-zero exit status: 2 
    Parse errors: Bad plan. You planned 15 tests but ran 0. 
t\02large.t (Wstat: 512 Tests: 0 Failed: 0) 
    Non-zero exit status: 2 
    Parse errors: Bad plan. You planned 15 tests but ran 0. 
t\03prune.t (Wstat: 512 Tests: 0 Failed: 0) 
    Non-zero exit status: 2 
    Parse errors: Bad plan. You planned 15 tests but ran 0. 
Files=6, Tests=2, 0 wallclock secs (0.05 usr + 0.05 sys = 0.09 CPU) 
Result: FAIL 
Failed 5/6 test programs. 0/2 subtests failed. 
    PIP/XML-Tidy-1.12.B55J2qn.tgz 
    C:\xampp\perl\bin\perl.exe ./Build test -- NOT OK 
//hint// to see the cpan-testers results for installing this module, try: 
    reports PIP/XML-Tidy-1.12.B55J2qn.tgz 
Warning (usually harmless): 'YAML' not installed, will not store persistent stat 
e 
Running Build install 
    make test had returned bad status, won't install without force 

事实上,我无法安装任何库(例如YAML)。我也试过别人的建议:

perl -MCPAN -e "CPAN::Shell->force(qw(XML::Tidy));" 

但是我有同样的结果。有人能帮我弄清楚如何安装这些软件包吗?我在Windows 7机器上运行Perl

+0

它是草莓还是ActivePerl?如果是后者,我建议使用他们自己的解决方案(PPM)来安装CPAN模块。 – raina77ow

+0

我正在使用'xampp'附带的'Perl' – cybertextron

回答

4

先修复较早的错误! XML::TidyTest::Pod::CoverageXML::XPath有说明依赖性。您没有安装它们,因此安装过程中必须发生错误。

+0

这个是固定的......我也使用'ppm'安装了'YAML'。但是错误仍然存​​在。 – cybertextron

+0

@philippe其实你并不需要安装'YAML'; ikegami命名实际上依赖于“XML :: Tidy”的模块。 – raina77ow