我遇到了以下问题,我不知道是什么介绍了它,但是 Mac 上的 perl 包含路径总是一场噩梦;
cpan[1]> install DateTime::Event::Recurrence
Going to read '/Users/Hristo/.cpan/Metadata'
Database was generated on Tue, 08 Jan 2013 11:07:23 GMT
Fetching with LWP:
http://ftp.belnet.be/mirror/ftp.cpan.org/authors/01mailrc.txt.gz
Catching error: "Can't locate HTML/HeadParser.pm in \@INC (\@INC contains: /opt/local/lib/perl5/site_perl/5.12.4/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.12.4 /opt/local/lib/perl5/vendor_perl/5.12.4/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.12.4 /opt/local/lib/perl5/5.12.4/darwin-thread-multi-2level /opt/local/lib/perl5/5.12.4 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl /Users/Hristo) at /opt/local/lib/perl5/site_perl/5.12.4/LWP/UserAgent.pm line 663, <FIN> line 1. at /opt/local/lib/perl5/site_perl/5.12.4/LWP/UserAgent.pm line 915, <FIN> line 1.\cJ" at /opt/local/lib/perl5/5.12.4/CPAN.pm line 391, <FIN> line 1.
CPAN::shell() called at /opt/local/lib/perl5/5.12.4/App/Cpan.pm line 295
App::Cpan::_process_options('App::Cpan') called at /opt/local/lib/perl5/5.12.4/App/Cpan.pm line 364
App::Cpan::run('App::Cpan') called at /opt/local/bin/cpan line 11
Fetching with LWP:
http://ftp.belnet.be/mirror/ftp.cpan.org/authors/01mailrc.txt.gz
Terminal does not support GetHistory.
Lockfile removed.
Can't locate HTML/HeadParser.pm in @INC (@INC contains: /opt/local/lib/perl5/site_perl/5.12.4/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.12.4 /opt/local/lib/perl5/vendor_perl/5.12.4/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.12.4 /opt/local/lib/perl5/5.12.4/darwin-thread-multi-2level /opt/local/lib/perl5/5.12.4 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl /Users/Hristo) at /opt/local/lib/perl5/site_perl/5.12.4/LWP/UserAgent.pm line 663, <FIN> line 1. at /opt/local/lib/perl5/site_perl/5.12.4/LWP/UserAgent.pm line 915, <FIN> line 1.
我在 /opt/local/lib/perl5/site_perl/5.12.4/darwin-multi-2level/HTML CPAN 中有 HTML::HeadParser 在此之前已经工作了几个月。
如何更改@INC
系统范围内的内容,以便 IDE (Eclipse) 和 CPAN 都知道如何查看。我一直在对 Makefile.PL 进行全局文件搜索,使用诸如sudo find / -name "*.PL" | xargs grep "Makefile"
在各种情况下尝试找到它并尝试此建议等命令,但到目前为止没有成功。(哦,我多么讨厌这个操作系统 :))