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

Hi Monks,

I'm trying to install LWP::Protocol::https::socket without any success. I was hoping someone would be able to help me with this issue. The OS I'm using is Oracle Linux 6.4 and Perl version v5.10.1. The reason I'm trying to load this module is because I have a script that is using WWW::Mechanize and I got the the following message:

"LWP::Protocol::https::Socket: connect: Network is unreacheable at /us +r/local/share/perl5/LWP/Protocol/http.pm line 51."
This same script works on another machine without any problems. Below is the error message when trying to install the module LWP::Protocol::https::Socket

cpan[1]> install LWP::Protocol::https::Socket CPAN: Storable loaded ok (v2.45) Going to read '/root/.cpan/Metadata' Database was generated on Mon, 28 Oct 2013 13:53:03 GMT Running install for module 'LWP::Protocol::https::Socket' CPAN: YAML loaded ok (v0.84) Running make for G/GA/GAAS/LWP-Protocol-https-6.04.tar.gz CPAN: Digest::SHA loaded ok (v5.47) CPAN: Compress::Zlib loaded ok (v2.062) Checksum for /root/.cpan/sources/authors/id/G/GA/GAAS/LWP-Protocol-htt +ps-6.04.tar.gz ok Scanning cache /root/.cpan/build for sizes ...................................................................... +......DONE CPAN: Archive::Tar loaded ok (v1.58) LWP-Protocol-https-6.04/ LWP-Protocol-https-6.04/Changes LWP-Protocol-https-6.04/lib/ LWP-Protocol-https-6.04/Makefile.PL LWP-Protocol-https-6.04/MANIFEST LWP-Protocol-https-6.04/META.json LWP-Protocol-https-6.04/META.yml LWP-Protocol-https-6.04/README LWP-Protocol-https-6.04/t/ LWP-Protocol-https-6.04/t/apache.t LWP-Protocol-https-6.04/lib/LWP/ LWP-Protocol-https-6.04/lib/LWP/Protocol/ LWP-Protocol-https-6.04/lib/LWP/Protocol/https.pm CPAN: File::Temp loaded ok (v0.2301) CPAN.pm: Going to build G/GA/GAAS/LWP-Protocol-https-6.04.tar.gz Checking if your kit is complete... Looks good Generating a GNU-style Makefile Writing Makefile for LWP::Protocol::https Writing MYMETA.yml and MYMETA.json cp lib/LWP/Protocol/https.pm blib/lib/LWP/Protocol/https.pm Manifying blib/man3/LWP::Protocol::https.3pm GAAS/LWP-Protocol-https-6.04.tar.gz /usr/bin/make -- OK Running make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Har +ness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib +', 'blib/arch')" t/*.t t/apache.t .. 1/4 # Failed test at t/apache.t line 15. # Failed test at t/apache.t line 16. # 'Can't connect to www.apache.org:443 (Network is u +nreachable) # # LWP::Protocol::https::Socket: connect: Network is unreachable at /us +r/local/share/perl5/LWP/Protocol/http.pm line 51. # ' # doesn't match '(?-xism:Apache Software Foundation)' # Failed test at t/apache.t line 23. # Looks like you failed 3 tests of 4. t/apache.t .. Dubious, test returned 3 (wstat 768, 0x300) Failed 3/4 subtests Test Summary Report ------------------- t/apache.t (Wstat: 768 Tests: 4 Failed: 3) Failed tests: 1-3 Non-zero exit status: 3 Files=1, Tests=4, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.12 cusr + 0.02 csys = 0.16 CPU) Result: FAIL Failed 1/1 test programs. 3/4 subtests failed. make: *** [test_dynamic] Error 3 GAAS/LWP-Protocol-https-6.04.tar.gz /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports GAAS/LWP-Protocol-https-6.04.tar.gz Running make install make test had returned bad status, won't install without force Failed during this command: GAAS/LWP-Protocol-https-6.04.tar.gz : make_test NO

Thanks Marto/Anonymous Monk, After installing IO::Socket::INET6, all my problems went away.

Replies are listed 'Best First'.
Re: Can't install LWP::Protocol::https::Socket
by Anonymous Monk on Oct 29, 2013 at 01:31 UTC

    I'm trying to install LWP::Protocol::https::socket without any success

    This Can't connect to www.apache.org:443 (Network is unreachable) says you're not connected to the internet, whether network outage or firewall .... lwpcook has info about proxy settings ...

    You can install a module with failing test, you either skip the tests, or you force install, or both cpan -f -i -T LWP::Protocol::https

      It seems the problem presents itself when trying to access secure sites "https" using Perl or cpan. I tried running wget https://www.apache.org and it was successful.

      I'm connected to the internet and I was able to install other packages without any problems.