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

I get the following errors with Strawberry Perl v5.26.1 on Windows, when trying to access website. The code works with older Perl, but I am trying to get the newer version to work too.

501 Attempt to reload IO/Socket/SSL.pm aborted. Compilation failed in require (LWP::Protocol::https not installed)

This is somewhat strange, since both IO::Socket:SSL.pm and LWP::Protocol::https are up to date. Tried to update Net::SSLeay to make sure SSL.pm has all it needs, but it doesn't compile:

bad reloc address 0x174 in section `.text' collect2.exe: error: ld returned 1 exit status gmake: *** [Makefile:492: blib\arch\auto\Net\SSLeay\SSLeay.xs.dll] Err +or 1 MIKEM/Net-SSLeay-1.85.tar.gz c:\Strawberry\c\bin\gmake.exe -- NOT OK

Replies are listed 'Best First'.
Re: 501 Attempt to reload IO/Socket/SSL.pm aborted.
by Corion (Patriarch) on Aug 03, 2018 at 12:33 UTC

    The error message contains "LWP::Protocol::https not installed" - I would pursure that avenue.

    How did you make sure that for your new version of Perl, LWP::Protocol::https is actually installed?

      As far as I recall, LWP::Protocol::https has always been bundled with Strawberry Perl (for details see Release Notes). With all the symptoms provided, I guess there's an issue with an openssl library. Strawberry Perl comes bundled with its own which should work quite fine, but perhaps the build procedures find another, incompatible version? An older one perhaps, lingering around from the old Perl version, which can't be replaced because the file is in use?

        Your guess is correct. It didn't have the openssl dll's for some reason and there doesn't seem to be anything Strawberry specific it approves. I extracted the Strawberry's web site's libssl and libcrypto to their respective folders perl\c\bin, but it didn't still find them and I don't know why it doesn't look in there. I copied them to \Strawberry\perl\vendor\lib\auto\Crypt\SSLeay to test if they work at all and after that I got at least a different error

        Net::SSL from Crypt-SSLeay can't verify hostnames; either install IO:: +Socket::SSL or turn off verification by setting the PERL_LWP_SSL_VERI +FY_HOSTNAME environment variable to 0 at /STRAWBERRY/perl/site/lib/LW +P/Protocol/http.pm line 50.

        If I remember correctly, this happens because Crypt-SSLeay doesn't support hostname verification, but instead I should use IO::Socket:SSL as the error message also tells? And I'm probably doing something wrong with the dll's, since they cannot be found.

        Edit: I could add use IO::Socket::SSL to the beginning of the code, but earlier it used that module automatically, so I suspect it just tries Crypt-SSLeay as the first one doesn't seem to work.

        Edit2: There are actually two Perl's on that server and just the first (older) has its c\bin in path. Might affect the finding of the dll's. <facepalm>