无法在cygwin上安装LWP :: Simple

问题描述 投票:2回答:4

我是一个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
perl cygwin lwp
4个回答
1
投票

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


1
投票

你的cpan输出告诉你的是LWP :: Simple有17个必备模块(它们需要运行的模块),你必须确保在cpan运行LWP的构建/测试/安装之前它们都已安装完毕::简单。

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

  1. 自动安装先决条件。
  2. 询问您是否安装先决条件
  3. 既不是1也不是2,而是让您手动处理它们的先决条件。

请记住,这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
投票

LWP有一个cygwin包:perl-libwww-perl

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


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
© www.soinside.com 2019 - 2024. All rights reserved.