JD has asked for the wisdom of the Perl Monks concerning the following question:

Good evening all!

I am trying to install the perl module 'LWP::Simple'. However, I keep geeting the following error in CPAN whenever I try to run the installation:

HTTP::Request version 6.07 or higher. # If your version isn't good enough, we'll skip those. # Your version is 6.18 and that's good enough t/base/default_content_type.t .. ok t/base/protocols.t ............. ok t/base/protocols/nntp.t ........ 1/1 # Failed test '404 on fake nntp url' # at t/base/protocols/nntp.t line 12. # got: '500' # expected: '404' # Looks like you failed 1 test of 1. t/base/protocols/nntp.t ........ Dubious, test returned 1 (wstat 256, +0x100) Failed 1/1 subtests

I have tried to look for an answer but am drawing a blank after 2 hours of searching. Could someone please advise on the best course of action to resolve this?

EDIT:

I have successfully installed the module, but it now only seems to work with URL's containing HTTP, any HTTPS URL's are registered as an 'unitialized value'. Has anyone else encountered this with LWP::Simple?

Replies are listed 'Best First'.
Re: LWP::Simple not installing on MAC OS Mojava
by 1nickt (Canon) on Mar 05, 2019 at 01:43 UTC

    Hi, see this issue reported today. ("Currently parts of *.perl.org seem to be down, including nntp.perl.org. This is causing the t/base/protocols/nntp.t test to fail")

    Hope this helps!


    The way forward always starts with a minimal test.
Re: LWP::Simple not installing on MAC OS Mojava
by stevieb (Canon) on Mar 04, 2019 at 23:55 UTC

    Hi JD,

    How are you installing the distribution?

    Note that you shouldn't install or change anything with your built-in Perl installation.

    I'm not familiar with Mac, but many folks here are who can provide guidance. I'd recommend waiting for them to respond (ahem, Nick, red phone is ringing...) before trying anything else and possibly rendering your computer useless.

    In Unix land, we use Perlbrew, on Windows, berrybrew to separate our system Perl installations from our userland ones. I'm not confident in advising whether Perlbrew should be used on your OS or not, so since you've taken a couple of hours already, I'd wait to see what our MacOS Monks say.

      Hi stevieb,

      Thank you for your advice, I had been using perlbrew in BASH but have recently changed to ZSH and it took me a while to realise I needed to change the $PATH to access perlbrew.

      I have installed perlbrew and CPANM and tried again to install LWP::Simple. However, an error till occurs, even when I force the installation and in the .cpanm/work/........./build.log I get the same error:

      t/00-report-prereqs.t .......... ok t/10-attrs.t ................... ok # Some tests for the PUT method can only be run on # HTTP::Request version 6.07 or higher. # If your version isn't good enough, we'll skip those. # Your version is 6.18 and that's good enough t/base/default_content_type.t .. ok t/base/protocols.t ............. ok # Failed test '404 on fake nntp url' # at t/base/protocols/nntp.t line 12. # got: '500' # expected: '404' # Looks like you failed 1 test of 1. t/base/protocols/nntp.t ........ Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests t/base/proxy.t ................. ok t/base/simple.t ................ ok t/base/ua.t .................... ok t/base/ua_handlers.t ........... ok t/leak/no_leak.t ............... ok t/local/autoload-get.t ......... ok t/local/autoload.t ............. ok

        I get the same error:

        So why dont you install the module already?

        A failing test does not prevent installation