WWW::Mechanize error: Error GETing url Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)

769 views Asked by At

I am very new to perl. I am using it at work, and I got the following error yesterday, for a script that was running just fine on the previous day.

Error GETing https://www.someurl.com:443: Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)

(Note: www.someurl.com is not a real url. I don't want to post the actual url in case it might be an issue.)

I am using the WWW::Mechanize for fetching a webpage and I get the error for the line

my $res = $mech->get( $url );

The actual value of $url is not even https it is http://www.someurl.com

I referred to the some questions on SO. Like this one Random error with WWW::Mechanize: Protocol scheme 'https' is not supported (LWP::Protocol::https not installed) which mentions which modules to check for and confirmed that they are all installed. Also checked Random error with WWW::Mechanize: Protocol scheme 'https' is not supported (LWP::Protocol::https not installed) but I don't think it applies to me as I'm not splitting a process into threads.

Can someone please help me out? I will be happy to post any other information required.

Edit: I am using RHEL7 server, with Perl 5.16.3. I have the WWW::Mechanize, openSSL, IO::Socket::SSL, LWP::Protocol:https, Net::SSLeay, Crypt::SSLeay installed.

We didn't change any configuration or code between the last time the script was working and the time it started failing.

1

There are 1 answers

0
brian d foy On

Install LWP::Protocol::https. This used to be bundled as part of LWP, but was then moved to its own distribution so the complexity of linking to the libraries that HTTPS needs doesn't burden all of LWP.

% cpan LWP LWP::Protocol::https