简体   繁体   English

无法在cygwin上安装LWP :: Simple

[英]Unable to install LWP::Simple on cygwin

I am a Perl beginner trying to install LWP::Simple on cygwin (CYGWIN_NT-6.3) but it fails to install. 我是一个Perl初学者试图在cygwin上安装LWP :: Simple(CYGWIN_NT-6.3),但是无法安装。 The installation seems to go wrong from the very start. 安装似乎从一开始就出错了。 Could you please help me to fix the problem? 你能帮我解决一下这个问题吗?

$ 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

There is a cygwin package for LWP: perl-libwww-perl LWP有一个cygwin包: perl-libwww-perl

If you need HTTPS you should probably install: perl-LWP-Protocol-https 如果您需要HTTPS,您应该安装: perl-LWP-Protocol-https

What your cpan output is telling you is that LWP::Simple has 17 prerequisite modules (modules that it requires in order to function) and you must insure that they are all installed before cpan will run the build/test/install for LWP::Simple. 你的cpan输出告诉你的是LWP :: Simple有17个必备模块(它们需要运行的模块),你必须确保在cpan运行LWP的构建/测试/安装之前它们都已安装完毕::简单。

Your cpan configuration can have three possible settings for what to do when cpan detects that prerequisites are not already installed on your system: 当cpan检测到系统上尚未安装先决条件时,您的cpan配置可以有三种可能的设置:

  1. Automatically install the prerequisites. 自动安装先决条件。
  2. Ask you whether to install the prerequisites 询问您是否安装先决条件
  3. Do neither 1 nor 2, and let you handle them prerequisites manually. 既不是1也不是2,而是让您手动处理它们的先决条件。

Keep in mind is that many of those 17 could also have prerequisites of their own, so it is often easiest, and usually safe to let cpan auto install the prerequisites. 请记住,这17个中的许多也可能具有自己的先决条件,因此通常最简单,并且通常可以安全地让cpan auto安装先决条件。

Unless you see output from cpan that explicitly says that an installation failed, you're doing fine. 除非你看到cpan的输出明确表示安装失败,否则你做得很好。


So given this error report: 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 所以给出了这个错误报告: 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 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

You'll want to try to figure out why WWW:RobotRules failed to install. 您将想要弄清楚为什么WWW:RobotRules无法安装。 I'd do it this way: 我这样做:

$ 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]

或者只是通过setup.exe安装perl_vendor

please try 请试试

cpan App::cpanminus
cpanm LWP::Simple

well, is it work 好吧,它有用吗?

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

or 要么

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

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

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