我试图在我的系统上第一次使用Perl,这是Ubuntu 12.04.我安装了Perl v.5.14.2.
我抬头看了 how to install Perl modules,所以我开始如下:
我抬头看了 how to install Perl modules,所以我开始如下:
$perl -MCPAN -e shell
向导开始配置环境,如下所示:http://pastebin.com/5hn8vkb5
虽然,它在中间停止,出现以下错误消息:
... Checksum for /home/john/.cpan/sources/authors/id/A/AP/APEIRON/local-lib-1.008009.tar.gz ok ---- Unsatisfied dependencies detected during ---- ---- APEIRON/local-lib-1.008009.tar.gz ---- ExtUtils::MakeMaker [build_requires] Running make test Make had some problems,won't test Delayed until after prerequisites Running make install Make had some problems,won't install Delayed until after prerequisites Can't locate local/lib.pm in @INC (@INC contains: /home/john/perl5/lib/perl5 /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl /home/john/Desktop) at /usr/share/perl/5.14/CPAN/FirstTime.pm line 1300.
如何在我的Ubuntu安装上正确设置Perl环境?
中断向导并再次重新启动后,不再出现错误消息.
如何再次启动向导,以便我可以在此处选择:
What approach do you want? (Choose ‘local::lib’,‘sudo’ or ‘manual’)
[local::lib]
解决方法
你缺少local :: lib,这是你告诉CPAN shell要做的事情.
您可以像这样安装它:
sudo apt-get install liblocal-lib-perl
您可以通过rm -rf-your〜/ .cpan目录重新开始.由您自担风险
但是,我建议尝试使用cpanminus而不是旧的CPAN shell.
sudo apt-get install cpanminus