【发布时间】:2021-09-07 02:59:22
【问题描述】:
我想在 BigSur 上使用 WWW:Mechanize 和 perl。 我的 Perl:
perl 5, version 34, subversion 0 (v5.34.0)
就使用模块而言,我可以安装 perl:
DBI;
LWP::UserAgent;
LWP::Simple qw /get/;
HTML::TreeBuilder;
HTML::Parser;URI qw();
尝试使用 WWW:: Mechanize;
失败:
Can't locate WWW/Mechanize.pm in @INC (you may need to install the WWW::Mechanize module)
@INC contains: /usr/local/Cellar/perl/5.34.0/lib/perl5/site_perl/5.34.0/darwin-thread-multi-2level /usr/local/Cellar/perl/5.34.0/lib/perl5/site_perl/5.34.0 /usr/local/Cellar/perl/5.34.0/lib/perl5/5.34.0/darwin-thread-multi-2level /usr/local/Cellar/perl/5.34.0/lib/perl5/5.34.0 /usr/local/lib/perl5/site_perl/5.34.0)
我尝试加载 WWW:Mechanize with
sudo cpanm WWW::Mechanize
答案是:
WWW::Mechanize 是最新的。 (2.03)
但是 BBEdit 仍然没有看到 WWW::Mechanize。
我怎样才能做到这一点?
【问题讨论】:
-
似乎您正在使用 Homebrew perl。可能与系统 perl 有冲突。你是如何安装
cpanm的?which cpanm的输出是什么?您是否也使用cpanm安装了其他模块?
标签: perl cpan macos-big-sur www-mechanize