3

I am a Perl beginner trying to install LWP::Simple on cygwin (CYGWIN_NT-6.3) but it fails to install. 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
krenkz
  • 484
  • 6
  • 15
  • There are no errors in your output. And if you are a beginner it might be better to just install Strawberry Perl which should include LWP::Simple already. – Steffen Ullrich Sep 12 '14 at 06:03

4 Answers4

2

There is a cygwin package for LWP: perl-libwww-perl

If you need HTTPS you should probably install: perl-LWP-Protocol-https

Sorin
  • 5,201
  • 2
  • 18
  • 45
1

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.

Your cpan configuration can have three possible settings for what to do when cpan detects that prerequisites are not already installed on your system:

  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.

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.

Unless you see output from cpan that explicitly says that an installation failed, you're doing fine.


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

You'll want to try to figure out why WWW:RobotRules failed to install. 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]
Len Jaffe
  • 3,442
  • 1
  • 21
  • 28
  • Perhaps you should add instructions on how to change the settings. – Brad Gilbert Sep 13 '14 at 00:45
  • @Len Jaffe - thank you for your suggestion - I reset the cpan configuration as advised here: stackoverflow.com/questions/898782/… nevertheless it did not help, so I re-installed my cygwin, checked that the configuration is set on option 1 (automatically install....) - yet I still do not manage to install the module. I believe the process of installation has changed but the code is too long to copy it here and I do not know which part of it is important to find where the problem is. – krenkz Sep 13 '14 at 11:26
  • @BradGilbert - it does not look like Grw needs to change any seetings. Cpan was installing prerequisites at the end of the output that was provided. I'm certain that that isn't the entire output, and that the last 20 or 30 lines would not only be additionally educational, but we've yet to see an example of trying to use LWP and it failing due to missing prerequisites. – Len Jaffe Sep 14 '14 at 21:12
  • This is the end of the installation process (sorry for the formatting - the comments do not seem to be customised to code formatting): 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 – krenkz Sep 15 '14 at 05:47
  • I've added to the bottom of my answer in light of your error message. You'll have to figure out why WWW::RobotRules is failing to install. – Len Jaffe Sep 15 '14 at 14:53
  • Thank you all for answers, I eventually installed Strawberry Perl and am generally happy with it – krenkz Dec 24 '14 at 20:34
1

or just install perl_vendor via setup.exe

rurban
  • 4,025
  • 24
  • 27
-1

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
  • thank you for suggestion but my cygwin will not install App::cpanminus ...Checking if your kit is complete... Looks good Warning: prerequisite ExtUtils::MakeMaker 6.58 not found. We have 6.5705. Writing Makefile for App::cpanminus Writing MYMETA.yml MIYAGAWA/App-cpanminus-1.7009.tar.gz make -- NOT OK 'YAML' not installed, will not store persistent state Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible – krenkz Sep 13 '14 at 11:30
  • may be, you try http://dwimperl.com/ it's package with many already installed modules – Николай Мишин Sep 15 '14 at 06:46