繁体   English   中英

草莓perl:没有File :: Tail.pm。 CPAN无法安装模块

[英]strawberry perl: no File::Tail.pm. CPAN failed to install the module

我正在使用草莓perl来使用File::Tail来拖尾文件。

我收到以下错误消息:

无法找到文件/ Tail.pm在@公司(@公司包含:C:\\草莓\\ perl的\\ lib文件C:/草莓/ perl的/网站/ lib目录C:/草莓/ perl的/供应商/ lib目录C:/草莓/ perl / lib。)在tailing.perl第5行.BEGIN失败 - 编译在tailing.perl第5行中止。

三个包包含lib:

  • c:\\strawberry\\perl\\lib
  • C:\\strawberry\\perl\\site\\lib
  • C:\\strawberry\\perl\\vendor\\lib

其中c:\\strawberry\\perl是perl安装的根目录。
我检查了所有三个包,但找不到File/Tail.pm

使用cpan install,但安装失败。

CPAN上的当前File::Tail发行版从未在Windows上通过其测试套件 Steffen Mueller 5年前为Windows 提交了一个补丁 ,但它从未被纳入CPAN的发行版。

他的补丁可以在这里找到 ,哈利路亚,它对我有用。 只需在任何地方拆开包装并运行常规

perl Makefile.PL
dmake
dmake test
dmake install

这是关于Strawberry Perl的好消息。

C:\Users\me > cpan File::Tail

当然,我得到了:

Test Summary Report
-------------------
t/10open.t       (Wstat: 0 Tests: 6 Failed: 4)
  Failed tests:  3-6
t/20tail.t       (Wstat: 0 Tests: 3 Failed: 3)
  Failed tests:  1-3
  Parse errors: Bad plan.  You planned 7 tests but ran 3.
t/30name_change.t (Wstat: 0 Tests: 1 Failed: 1)
  Failed test:  1
  Parse errors: Bad plan.  You planned 2 tests but ran 1.
Files=3, Tests=10, 32 wallclock secs ( 0.03 usr +  0.09 sys =  0.12 CPU)
Result: FAIL
Failed 3/3 test programs. 8/10 subtests failed.
dmake.EXE:  Error code 255, while making 'test_dynamic'
  MGRABNAR/File-Tail-0.99.3.tar.gz
  C:\strawberry\c\bin\dmake.EXE test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports MGRABNAR/File-Tail-0.99.3.tar.gz
Running make install
  make test had returned bad status, won't install without force

所以我不推荐它。

并非所有模块都是标准模块集的一部分。 您应该检查Perldoc Perl文档。 它包含所有标准 Perl模块。 如果模块不在那里,则必须安装它。

正如Axeman所说,您可以使用cpan命令安装任何模块。 只需在命令提示符下键入cpan ,当您获得cpan>提示符时,键入install File::Tail 它应该自动为您安装所有内容,包括先决条件。

您还可以查看CPAN评级的模块评论。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM