我遇到了以下问题我不知道是什么介绍它但是perl包含Mac上的路径始终是一场噩梦;
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中有HTML :: HeadParser CPAN在此之前已经工作了几个月。
如何更改@INC
系统范围 中的内容,以便IDE(Eclipse)和CPAN都知道如何查看。
我一直在使用sudo find / -name "*.PL" | xargs grep "Makefile"
等命令对Makefile.PL进行全局文件搜索以尝试查找并尝试this recommendation,但到目前为止还没有成功。 (哦,我讨厌这个操作系统:))
答案 0 :(得分:1)
我不知道确切的解决方案,可能这个链接会有所帮助..
答案 1 :(得分:0)
如果定义了$Config{usesitecustomize}
,您可以在sitecustomize.pl
查找$Config{sitelib}\\sitecustomize.pl
。请参阅perlrun
。
%Config
变量告诉您perl如何编译运行,因此需要重新编译才能更改它。
除此之外,您还可以更改运行的任何通用登录脚本(如果有),以便环境变量PERL5LIB
包含您的路径 - 我相信环境变量PERLLIB
仍然有用。