无法在cygwin上安装LWP :: Simple

时间:2014-09-12 05:40:37

标签: perl cygwin lwp

我是一名Perl初学者,试图在cygwin上安装LWP :: Simple(CYGWIN_NT-6.3),但无法安装。安装似乎从一开始就出错了。你能帮我解决一下这个问题吗?

$ perl -MCPAN -e'install "LWP::Simple"'

Going to read '/home/grw.kremilek/.cpan/Metadata'
  Database was generated on Thu, 11 Sep 2014 19:53:17 GMT
Running install for module 'LWP::Simple'
Running make for M/MS/MSCHILLI/libwww-perl-6.08.tar.gz
Checksum for /home/grw.kremilek/.cpan/sources/authors/id/M/MS/MSCHILLI/libwww-perl-6.08.tar.gz ok

  CPAN.pm: Going to build M/MS/MSCHILLI/libwww-perl-6.08.tar.gz

Checking if your kit is complete...
Looks good
Warning: prerequisite Encode::Locale 0 not found.
Warning: prerequisite File::Listing 6 not found.
Warning: prerequisite HTML::Entities 0 not found.
Warning: prerequisite HTML::HeadParser 0 not found.
Warning: prerequisite HTTP::Cookies 6 not found.
Warning: prerequisite HTTP::Daemon 6 not found.
Warning: prerequisite HTTP::Date 6 not found.
Warning: prerequisite HTTP::Negotiate 6 not found.
Warning: prerequisite HTTP::Request 6 not found.
Warning: prerequisite HTTP::Request::Common 6 not found.
Warning: prerequisite HTTP::Response 6 not found.
Warning: prerequisite HTTP::Status 6 not found.
Warning: prerequisite LWP::MediaTypes 6 not found.
Warning: prerequisite Net::HTTP 6.07 not found.
Warning: prerequisite URI 1.10 not found.
Warning: prerequisite URI::Escape 0 not found.
Warning: prerequisite WWW::RobotRules 6 not found.
Writing Makefile for LWP
Writing MYMETA.yml
---- Unsatisfied dependencies detected during ----
----     MSCHILLI/libwww-perl-6.08.tar.gz     ----
    URI::Escape [requires]
    LWP::MediaTypes [requires]
    Encode::Locale [requires]
    HTTP::Status [requires]
    File::Listing [requires]
    HTTP::Negotiate [requires]
    HTML::Entities [requires]
    HTTP::Daemon [requires]
    Net::HTTP [requires]
    URI [requires]
    HTML::HeadParser [requires]
    HTTP::Cookies [requires]
    HTTP::Request::Common [requires]
    HTTP::Date [requires]
    HTTP::Response [requires]
    HTTP::Request [requires]
    WWW::RobotRules [requires]
Running make test
  Delayed until after prerequisites
Running make install
  Delayed until after prerequisites
Running install for module 'URI::Escape'
Running make for E/ET/ETHER/URI-1.64.tar.gz
Checksum for /home/grw.kremilek/.cpan/sources/authors/id/E/ET/ETHER/URI-1.64.tar.gz ok

4 个答案:

答案 0 :(得分:1)

你的cpan输出告诉你的是LWP :: Simple有17个必备模块(为了运行它需要的模块),你必须确保在cpan运行build / test / install之前安装它们。 LWP ::简单。

当cpan检测到系统上尚未安装先决条件时,您的cpan配置可以有三种可能的设置:

  1. 自动安装先决条件。
  2. 询问您是否安装先决条件
  3. 既不要1也不要2,让你手动处理它们的先决条件。
  4. 请记住,17个中的许多人也可以拥有自己的先决条件,因此通常最简单,并且通常可以安全地让cpan auto安装先决条件。

    除非你看到cpan的输出明确表示安装失败,否则你做得很好。


    所以给出了这个错误报告: Warning: Prerequisite 'WWW::RobotRules => 6' for 'MSCHILLI/libwww-perl-6.08.tar.gz' failed when processing 'GAAS/WWW-RobotRules-6.02.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited. MSCHILLI/libwww-perl-6.08.tar.gz make -- NOT OK Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible

    您想要弄清楚WWW:RobotRules无法安装的原因。我这样做:

    $ cpan
    cpan[1]> look WWW::RobotRules
    [The module is downloaded is needed and then a shell is opened into the download directory]
    $ perl Makefile.PL
    $ make
    $ make test
    [This is where failure is likely to occur - report the failure messages back to us]
    

答案 1 :(得分:1)

或只是通过perl_vendor

安装setup.exe

答案 2 :(得分:1)

有一个用于LWP的cygwin软件包:perl-libwww-perl

如果您需要HTTPS,则可能应该安装:perl-LWP-Protocol-https

答案 3 :(得分:0)

请尝试

cpan App::cpanminus
cpanm LWP::Simple

嗯,是否有效

curl -L http://cpanmin.us | perl - --sudo App::cpanminus

cd ~/bin
curl -LO http://xrl.us/cpanm
chmod +x cpanm
# edit shebang if you don't have /usr/bin/env