www ::机械化错误:错误获得URL协议方案' https'不支持(LWP ::协议:: HTTPS未安装)

发布于 2025-02-03 15:49:27 字数 1106 浏览 3 评论 0 原文

我是Perl的新手。我在工作中使用它,昨天我遇到了以下错误,该脚本在前一天正常运行。

错误获取 https://www.someurl.com:443 :是 不支持(LWP ::协议:: https未安装)

(注意: www.someurl.com URL。

不是真正

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

的 $ url的实际值甚至都不是 https 它是 http://www.someurl.com

我在So上提到了一些问题。像这样哪些模块可以检查并确认它们全部已安装。还检查了,但我认为它不适用于我,因为我没有将过程分为线程。

有人可以帮我吗?我很乐意发布所需的任何其他信息。

编辑:我正在使用RHEL7服务器,其中Perl 5.16.3。 我有www ::机械化,openssl,io :: socket :: ssl,lwp ::协议:https,net :: ssleay,crypt :: ssleay已安装。

我们没有在脚本工作的最后一次工作和开始失败的时间之间更改任何配置或代码。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

挽你眉间 2025-02-10 15:49:27

安装 LWP ::协议:: HTTPS 。这曾经是LWP的一部分捆绑在一起,但随后被转移到其自身的分布中,因此链接到HTTPS需求并不负担所有LWP的库的复杂性。

% cpan LWP LWP::Protocol::https

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文