我是一个全新的 perl 用户,试图安装 perl 模块及其依赖项。
我正在尝试在新的 Ubuntu 16.10 云服务器实例上安装我需要的 perl 依赖项,但它们没有注册为已安装。
例如
cpanm --skip-installed LWP::Simple
节目
--> Working on LWP::Simple
Fetching http://www.cpan.org/authors/id/O/OA/OALDERS/libwww-perl-6.21.tar.gz ... OK
Configuring libwww-perl-6.21 ... OK
==> Found dependencies: WWW::RobotRules, Net::HTTP, File::Listing, HTTP::Daemon, Test::RequiresInternet, Test::Fatal, HTTP::Negotiate, HTTP::Cookies
--> Working on WWW::RobotRules
Fetching http://www.cpan.org/authors/id/G/GA/GAAS/WWW-RobotRules-6.02.tar.gz ... OK
Configuring WWW-RobotRules-6.02 ... OK
Building and testing WWW-RobotRules-6.02 ... OK
Successfully installed WWW-RobotRules-6.02
--> Working on Net::HTTP
Fetching http://www.cpan.org/authors/id/O/OA/OALDERS/Net-HTTP-6.13.tar.gz ... OK
Configuring Net-HTTP-6.13 ... OK
Building and testing Net-HTTP-6.13 ... OK
Successfully installed Net-HTTP-6.13
...
! Installing the dependencies failed: Module 'File::Listing' is not installed, Module 'HTTP::Daemon' is not installed, Module 'Test::RequiresInternet' is not installed, Module 'HTTP::Cookies' is not installed, Module 'Test::Fatal' is not installed, Module 'HTTP::Negotiate' is not installed, Module 'WWW::RobotRules' is not installed, Module 'Net::HTTP' is not installed
! Bailing out the installation for libwww-perl-6.21.
8 distributions installed
我是否使用了正确的工具?在哪里可以找到或生成更详细的错误日志?
以下是我的安装过程中的选择,但实验可能意味着它并不完全具有代表性。
sudo apt-get install unzip make cmake perl build-essential curl cpanminus
cpanm --self-upgrade --sudo
sudo ln -s /usr/bin/unzip /bin/unzip
export PERL_INSTALL_ROOT=/home/ubuntu/perl5
export PERL5LIB=/home/ubuntu/perl5
export PERL_CPANM_OPT="--local-lib=/home/ubuntu/perl5"
mkdir -p /home/ubuntu/perl5
chown -R ubuntu:ubuntu /home/ubuntu/perl5
chown -R ubuntu:ubuntu /home/ubuntu/.cpanm
cpanm --local-lib=/home/ubuntu/perl5 local::lib && eval $(perl -I /home/ubuntu/perl5/lib/perl5/ -Mlocal::lib)
cpanm File::Copy::Recursive
cpanm Archive::Zip
cpanm --skip-installed LWP::Simple