Perl cpan:安装DateTime时出错,CHECKSUM下载失败

时间:2013-06-20 02:39:07

标签: perl cpan

我在共享的Red Hat Linux 6.2服务器上运行Perl 5.10。我已经要求机器的root用户使用以下命令为我安装Perl DateTime模块:

perl -MCPAN -e shell CPAN>安装DateTime

我们之前能够成功安装其他Perl模块,例如Text :: CSV。

但安装DateTime时发生以下错误。以下是错误日志的最后几位:

问题:看起来错误可能是抱怨无法从ftp://ftp.perl.org/pub/CPAN/authors/id/R/RJ/RJBS获取CHECKSUM文件。但是,我从Internet Explorer浏览到这个确切的文件没有问题。有人可以提出解决方法吗?感谢。

Trying with "/usr/bin/wget -O /root/.cpan/sources/authors/id/R/RJ/RJBS/CHECKSUMS.tmp12173" to get
    "ftp://ftp.perl.org/pub/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS.gz"
    --2013-06-20 09:30:06--  ftp://ftp.perl.org/pub/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS.gz
           => b/root/.cpan/sources/authors/id/R/RJ/RJBS/CHECKSUMS.tmp12173b
Resolving ftp.perl.org... 203.178.137.175, 163.143.1.21 Connecting to ftp.perl.org|203.178.137.175|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/CPAN/authors/id/R/RJ/RJBS ... done.
==> SIZE CHECKSUMS.gz ... done.
==> PASV ... done.    ==> RETR CHECKSUMS.gz ... 
No such file bCHECKSUMS.gzb.

Warning: no success downloading '/root/.cpan/sources/authors/id/R/RJ/RJBS/CHECKSUMS.tmp12173'. Giving up on it. at /usr/share/perl5/CPAN/Distribution.pm line
1311

As a last resort we now switch to the external ftp command '/usr/kerberos/bin/ftp'
to get '/root/.cpan/sources/authors/id/R/RJ/RJBS/CHECKSUMS.tmp12173'.

Doing so often leads to problems that are hard to diagnose.

If you're the victim of such problems, please consider unsetting the ftp config variable with

    o conf ftp ""
    o conf commit

Issuing "/usr/kerberos/bin/ftp -n"

  Trying with external ftp to get
    ftp://ftp.perl.org/pub/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS
  Going to send the dialog
    open ftp.perl.org
    user anonymous Red Hat, Inc.@localhost.localdomain
    lcd /root/.cpan/sources/authors/id/R/RJ/RJBS
    cd /
    cd pub
    cd CPAN
    cd authors
    cd id
    cd R
    cd RJ
    cd RJBS
    bin
    get CHECKSUMS CHECKSUMS.tmp12173
    quit

Not connected.
Local directory now /root/.cpan/sources/authors/id/R/RJ/RJBS
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Bad luck... Still failed!
Can't access URL ftp://ftp.perl.org/pub/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS.

Your urllist is empty! The urllist can be edited. E.g. with 'o conf urllist push ftp://myurl/'

Could not fetch authors/id/R/RJ/RJBS/CHECKSUMS

UPDATE1:

我们还尝试了o conf ftp“”和o conf commit命令,但我们仍然有错误。

Trying with "/usr/bin/wget -O /root/.cpan/sources/authors/id/R/RJ/RJBS/CHECKSUMS.tmp16529" to get
    "http://www.perl.org/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS.gz"
    --2013-06-20 13:52:07--  http://www.perl.org/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS.gz
Resolving www.perl.org... 207.171.7.41, 207.171.7.51 Connecting to www.perl.org|207.171.7.41|:80... failed: Connection refused.
Connecting to www.perl.org|207.171.7.51|:80... failed: Connection refused.
Warning: no success downloading '/root/.cpan/sources/authors/id/R/RJ/RJBS/CHECKSUMS.tmp16529'. Giving up on it. at /usr/share/perl5/CPAN/Distribution.pm line
1311
Fetching with LWP:
  ftp://ftp.perl.org/pub/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/R/RJ/RJBS/Test-Fatal-0.010.tar.gz ok Test-Fatal-0.010 Test-Fatal-0.010/README Test-Fatal-0.010/Changes Test-Fatal-0.010/LICENSE Test-Fatal-0.010/dist.ini Test-Fatal-0.010/META.yml Test-Fatal-0.010/MANIFEST Test-Fatal-0.010/t Test-Fatal-0.010/t/basic.t Test-Fatal-0.010/META.json Test-Fatal-0.010/Makefile.PL Test-Fatal-0.010/lib/Test Test-Fatal-0.010/lib/Test/Fatal.pm
Test-Fatal-0.010/t/like-exception.t
Test-Fatal-0.010/t/release-pod-syntax.t

  CPAN.pm: Going to build R/RJ/RJBS/Test-Fatal-0.010.tar.gz

Checking if your kit is complete...
Looks good
Warning: prerequisite Try::Tiny 0.07 not found.
Writing Makefile for Test::Fatal
Could not read '/root/.cpan/build/Test-Fatal-0.010-GNYnPy/META.yml'. Falling back to other methods to determine prerequisites
---- Unsatisfied dependencies detected during ----
----       RJBS/Test-Fatal-0.010.tar.gz       ----
    Try::Tiny [requires]
Shall I follow them and prepend them to the queue of modules we are processing right now? [yes] Running make test
  Delayed until after prerequisites
Running make install
  Delayed until after prerequisites
Running install for module 'Try::Tiny'
'YAML' not installed, falling back to Data::Dumper and Storable to read prefs '/root/.cpan/prefs'
Running make for D/DO/DOY/Try-Tiny-0.12.tar.gz Fetching with LWP:
  http://www.perl.org/CPAN/authors/id/D/DO/DOY/Try-Tiny-0.12.tar.gz
LWP failed with code[500] message[Can't connect to www.perl.org:80 (connect: Connection refused)] Fetching with LWP:
  ftp://ftp.perl.org/pub/CPAN/authors/id/D/DO/DOY/Try-Tiny-0.12.tar.gz
LWP failed with code[500] message[]
Fetching with Net::FTP:
  ftp://ftp.perl.org/pub/CPAN/authors/id/D/DO/DOY/Try-Tiny-0.12.tar.gz
Catching error: "Timeout at /usr/share/perl5/Net/FTP.pm line 491\cJ" at /usr/share/perl5/CPAN.pm line 391
        CPAN::shell() called at -e line 1

1 个答案:

答案 0 :(得分:1)

你做了它的建议吗?

If you're the victim of such problems, please consider unsetting the ftp config variable with

o conf ftp ""
o conf commit

或者,您可以从cpan站点下载模块作为gz文件 将其解压缩到目录 做

  perl Build.PL
./Build install

perl Makefile.PL 
make install

相应。

这就是cpan所做的一切,你会看到你是否遗漏了任何包或模块

顺便提一下,如果您乐意在其他地方安装模块,则无需成为root用户。有很多例子可以实现这个目标