首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Perl :安装DateTime错误,校验和下载失败

Perl :安装DateTime错误,校验和下载失败
EN

Stack Overflow用户
提问于 2013-06-20 02:39:06
回答 1查看 2.4K关注 0票数 0

我正在共享RedHatLinux6.2服务器上运行Perl 5.10。我已经要求机器的根用户使用以下命令为我安装Perl DateTime模块:

perl -MCPAN -e cpan> cpan>安装DateTime

我们之前成功地安装了其他Perl模块,如Text::CSV。

但是,在安装DateTime时发生了以下错误。下面是错误日志的最后一部分:

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

代码语言:javascript
复制
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提交命令,但仍然有一个错误。

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-06-20 03:15:46

你照它说的做了吗?

代码语言:javascript
复制
If you're the victim of such problems, please consider unsetting the ftp config variable with

o conf ftp ""
o conf commit

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

代码语言:javascript
复制
  perl Build.PL
./Build install

代码语言:javascript
复制
perl Makefile.PL 
make install

相应地。

这就是cpan将要做的所有事情,所以您将看到是否缺少任何包或模块

顺便说一句,如果你乐意在其他地方安装你的模块,你不需要成为根用户。有很多例子可以实现这一点。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17204458

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档