我正在尝试使用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