【问题标题】:(perl) how the Terminal (Mac) can locate LWP... in @INC?(perl) 终端 (Mac) 如何在 @INC 中找到 LWP...?
【发布时间】:2020-12-09 22:21:55
【问题描述】:

我尝试在终端中运行我的 perl 代码,但出现此错误:

Can't locate LWP/Protocol/https.pm in @INC (you may need to install the LWP::Protocol::https module) (@INC contains: /Users/wobot/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/darwin-2level /Users/wobot/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0 /Users/wobot/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/darwin-2level /Users/wobot/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0) at projet.pl line 23.

我通过 cpan 安装了 LWP :: Protocol 模块,但问题仍然存在。 如何解决?

【问题讨论】:

  • 我安装了 LWP :: Protocol 模块 - LWP::Protocol 和 LWP::Protocol::https 是两个独立的模块。

标签: perl terminal cpan


【解决方案1】:

按照错误提示安装模块。来自module documentation

LWP::Protocol::https 模块支持在 LWP 中使用 https 方案 URL。这个模块是LWP协议处理的插件,所以不要直接使用。一旦安装了模块,LWP 就能够使用 HTTP over SSL/TLS 访问站点。

正如Dave Cross 强调的那样,在他的 cmets 中,LWP::ProtocolLWP::Protocol::https 是两个独立的模块,但正如文档所述,后者并未直接使用。

【讨论】:

  • 为清楚起见,您可能会提到 Dave Cross 在 cmets 中所说的,它们是两个不同的模块,他安装了一个,但没有安装另一个。
  • @TLP 如此注明。谢谢。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2020-07-15
  • 2013-05-19
  • 2012-06-23
  • 1970-01-01
  • 2013-12-12
  • 2021-05-05
  • 2019-10-08
相关资源
最近更新 更多