问题描述
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模块,但问题仍然存在。 该怎么解决?
解决方法
按照错误提示安装模块。来自module documentation:
LWP :: Protocol :: https模块提供了对通过LWP使用https计划的URL的支持。该模块是LWP协议处理的插件,因此您不能直接使用它。一旦安装了模块,LWP就可以使用基于SSL / TLS的HTTP访问站点。
Dave Cross强调指出,LWP::Protocol
和LWP::Protocol::https
是两个独立的模块,但是正如文档所述,后者不能直接使用。