[英]Installation of modules from cpan mirror not working
I am new to Perl so please bear with me. 我是Perl的新手,请多多包涵。
I have tried to use minicpan on a Linux machine with no access to internet. 我试图在无法访问互联网的Linux机器上使用minicpan。 I did this by creating a repository on a windows machine with internet successfully using minicpan -l C:/MINICPAN/ -r http://mirror.optusnet.com.au/CPAN
, and then copying C:/MINICPAN/
to the Linux box ( /opt/perlLib/MINICPAN/
). 为此,我使用minicpan -l C:/MINICPAN/ -r http://mirror.optusnet.com.au/CPAN
成功地在具有Internet的Windows计算机上创建了存储库,然后将C:/MINICPAN/
复制到了Linux框( /opt/perlLib/MINICPAN/
)。
The problem is, if I use cpanm --mirror file:///opt/perlLib/MINICPAN Net::SSH::Perl
it just hangs. 问题是,如果我使用cpanm --mirror file:///opt/perlLib/MINICPAN Net::SSH::Perl
它只会挂起。
If I use cpanm --mirror file:///opt/perlLib/MINICPAN -L /usr/lib/perl5/site_perl/5.8.8/ Net::SSH::Perl
I get the following but it just hangs after that: 如果我使用cpanm --mirror file:///opt/perlLib/MINICPAN -L /usr/lib/perl5/site_perl/5.8.8/ Net::SSH::Perl
我会得到以下内容,但之后会挂起:
==> Found dependencies: ExtUtils::MakeMaker, ExtUtils::Install
If I use cpanm --mirror file:///opt/perlLib/MINICPAN Net::SSH::Perl --mirror-only
I get: Net::SSH::Perl is up to date. (1.36)
如果我使用cpanm --mirror file:///opt/perlLib/MINICPAN Net::SSH::Perl --mirror-only
我会得到: Net::SSH::Perl is up to date. (1.36)
Net::SSH::Perl is up to date. (1.36)
I am using v5.8.8 built for x86_64-linux-thread-multi 我正在使用为x86_64-linux-thread-multi构建的v5.8.8
Is there an path issue that needs fixing? 是否存在需要修复的路径问题? Is it a version problem (my windows box is using perl 5.18). 这是版本问题吗(我的Windows框使用的是Perl 5.18)。
Any help/advice is appreciated. 任何帮助/建议表示赞赏。
Thank you 谢谢
As per the cpanm documentation , you are correct to use --mirror-only
; 根据cpanm文档 ,您正确使用--mirror-only
; it says: "Select this option if you are using a local mirror of CPAN, such as minicpan when you're offline". 它说:“如果您使用的是CPAN本地镜像,例如离线时使用minicpan,请选择此选项”。 Without --mirror-only
it presumably is hanging trying to connect to the internet. 如果没有--mirror-only
它可能会挂起,试图连接到Internet。
With --mirror-only
you are told that you have an up-to-date version of Net::SSH::Perl - are you sure that you don't have it installed? --mirror-only
使用--mirror-only
会告诉您您具有Net :: SSH :: Perl的最新版本-您确定没有安装它吗? What happens if you try with --mirror-only
and some other module? 如果尝试使用--mirror-only
和其他模块会怎样?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.