我正在尝试使用local::lib
,因为我没有系统管理员权限,我想下载并安装本地库。我跑了以下:
perl Makefile.PL --bootstrap
make test && make install
echo 'eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)' >>~/.bashrc
在此之后,我尝试通过cpan下载模块
通过运行perl -MCPAN -e shell install netAddr::IP
,但当我运行我的程序时,它给出了一个错误:
Can't locate NetAddr/IP.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at agha.pl line 8.
BEGIN failed--compilation aborted at agha.pl line 8.
我认为这意味着模块没有安装......所以我再次尝试通过CPAN,但现在它的发出错误(这是在Linux中):
-bash-3.2$ perl -MCPAN -e shell
There seems to be running another CPAN process (pid 15611). Contacting...
Other job is running.
You may want to kill it and delete the lockfile, maybe. On UNIX try:
kill 15611
rm /homes/ar312/.cpan/.lock
答案 0 :(得分:1)
答案 1 :(得分:0)
严肃地说,安装perlbrew可以节省大量时间和麻烦。
perlbrew是一个管理$ HOME目录中多个perl安装的工具。它们是完全孤立的perl宇宙。这种方法有很多好处: