我正在尝试使用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));"
但是我有同样的结果。有人可以帮我弄清楚如何安装这些软件包吗?我Perl
在一Windows 7
台机器上运行。