简体   繁体   English

尝试使用cpan安装Perl模块时,为什么会出现“找不到404”和“无法更改目录”错误?

[英]Why do I get “404 Not Found” and “Failed to change directory” errors when I try to install a Perl module with cpan?

I tried to install Capture::Tiny with this command: 我尝试使用以下命令安装Capture::Tiny

cpan Capture/Tiny

But the installation fails with the following output: 但是安装失败,并显示以下输出:

Reading '/root/.cpan/Metadata'
  Database was generated on Wed, 25 May 2016 08:17:02 GMT
Running make for C/C//C/Ca/Capture/Tiny
Fetching with HTTP::Tiny:
http://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
HTTP::Tiny failed with code[404] message[Not Found]
Fetching with HTTP::Tiny:
http://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny.gz
HTTP::Tiny failed with code[404] message[Not Found]

Trying with
    /usr/bin/wget -O "/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548"
to get
    http://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
--2016-05-25 21:07:02--  http://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
Resolving mirrors.dotsrc.org (mirrors.dotsrc.org)... 130.225.254.116, 2001:878:346::116
Connecting to mirrors.dotsrc.org (mirrors.dotsrc.org)|130.225.254.116|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-05-25 21:07:02 ERROR 404: Not Found.


    Function system("/usr/bin/wget -O "/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548" "http://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny" ")
    returned status 8 (wstat 2048), left
/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548 with size 0
    Warning: no success downloading '/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548'. Giving up on it.
Fetching with Net::FTP:
ftp://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
  Couldn't cwd cpan/authors/id/C/C/C/Ca/Capture: Failed to change directory.

Fetching with Net::FTP
ftp://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny.gz
  Couldn't cwd cpan/authors/id/C/C/C/Ca/Capture: Failed to change directory.


Trying with
    /usr/bin/wget -O "/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548"
to get
    ftp://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
--2016-05-25 21:07:03--  ftp://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
           => ‘/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548’
Resolving mirrors.dotsrc.org (mirrors.dotsrc.org)... 130.225.254.116, 2001:878:346::116
Connecting to mirrors.dotsrc.org (mirrors.dotsrc.org)|130.225.254.116|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /cpan/authors/id/C/C//C/Ca/Capture ... 
No such directory ‘cpan/authors/id/C/C//C/Ca/Capture’.


    Function system("/usr/bin/wget -O "/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548" "ftp://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny" ")
    returned status 8 (wstat 2048), left
/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548 with size 0
    Warning: no success downloading '/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548'. Giving up on it.

Trying with
    /usr/bin/wget -O "/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548"
to get
    http://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
--2016-05-25 21:07:03--  http://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
Resolving mirrors.dotsrc.org (mirrors.dotsrc.org)... 130.225.254.116, 2001:878:346::116
Connecting to mirrors.dotsrc.org (mirrors.dotsrc.org)|130.225.254.116|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-05-25 21:07:03 ERROR 404: Not Found.


    Function system("/usr/bin/wget -O "/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548" "http://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny" ")
    returned status 8 (wstat 2048), left
/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548 with size 0

Trying with
    /usr/bin/wget -O "/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548"
to get
    ftp://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
--2016-05-25 21:07:03--  ftp://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
           => ‘/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548’
Resolving mirrors.dotsrc.org (mirrors.dotsrc.org)... 130.225.254.116, 2001:878:346::116
Connecting to mirrors.dotsrc.org (mirrors.dotsrc.org)|130.225.254.116|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /cpan/authors/id/C/C//C/Ca/Capture ... 
No such directory ‘cpan/authors/id/C/C//C/Ca/Capture’.


    Function system("/usr/bin/wget -O "/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548" "ftp://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny" ")
    returned status 8 (wstat 2048), left
/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548 with size 0
    Warning: no success downloading '/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548'. Giving up on it.
No external ftp command available

Fetching with HTTP::Tiny:
http://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
HTTP::Tiny failed with code[404] message[Not Found]
Fetching with HTTP::Tiny:
http://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny.gz
HTTP::Tiny failed with code[404] message[Not Found]

Trying with
    /usr/bin/wget -O "/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548"
to get
    http://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
--2016-05-25 21:07:03--  http://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
Resolving mirrors.dotsrc.org (mirrors.dotsrc.org)... 130.225.254.116, 2001:878:346::116
Connecting to mirrors.dotsrc.org (mirrors.dotsrc.org)|130.225.254.116|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-05-25 21:07:03 ERROR 404: Not Found.


    Function system("/usr/bin/wget -O "/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548" "http://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny" ")
    returned status 8 (wstat 2048), left
/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548 with size 0
    Warning: no success downloading '/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548'. Giving up on it.

Trying with
    /usr/bin/wget -O "/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548"
to get
    http://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
--2016-05-25 21:07:03--  http://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
Resolving mirrors.dotsrc.org (mirrors.dotsrc.org)... 130.225.254.116, 2001:878:346::116
Connecting to mirrors.dotsrc.org (mirrors.dotsrc.org)|130.225.254.116|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-05-25 21:07:03 ERROR 404: Not Found.


    Function system("/usr/bin/wget -O "/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548" "http://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny" ")
    returned status 8 (wstat 2048), left
/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548 with size 0
    Warning: no success downloading '/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548'. Giving up on it.
Fetching with Net::FTP:
ftp://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
  Couldn't cwd cpan/authors/id/C/C/C/Ca/Capture: Failed to change directory.

Fetching with Net::FTP
ftp://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny.gz
  Couldn't cwd cpan/authors/id/C/C/C/Ca/Capture: Failed to change directory.


Trying with
    /usr/bin/wget -O "/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548"
to get
    ftp://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
--2016-05-25 21:07:03--  ftp://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
           => ‘/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548’
Resolving mirrors.dotsrc.org (mirrors.dotsrc.org)... 130.225.254.116, 2001:878:346::116
Connecting to mirrors.dotsrc.org (mirrors.dotsrc.org)|130.225.254.116|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /cpan/authors/id/C/C//C/Ca/Capture ... 
No such directory ‘cpan/authors/id/C/C//C/Ca/Capture’.


    Function system("/usr/bin/wget -O "/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548" "ftp://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny" ")
    returned status 8 (wstat 2048), left
/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548 with size 0
    Warning: no success downloading '/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548'. Giving up on it.

Trying with
    /usr/bin/wget -O "/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548"
to get
    ftp://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
--2016-05-25 21:07:03--  ftp://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny
           => ‘/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548’
Resolving mirrors.dotsrc.org (mirrors.dotsrc.org)... 130.225.254.116, 2001:878:346::116
Connecting to mirrors.dotsrc.org (mirrors.dotsrc.org)|130.225.254.116|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /cpan/authors/id/C/C//C/Ca/Capture ... 
No such directory ‘cpan/authors/id/C/C//C/Ca/Capture’.


    Function system("/usr/bin/wget -O "/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548" "ftp://mirrors.dotsrc.org/cpan/authors/id/C/C//C/Ca/Capture/Tiny" ")
    returned status 8 (wstat 2048), left
/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548 with size 0
    Warning: no success downloading '/root/.cpan/sources/authors/id/C/C/C/Ca/Capture/Tiny.tmp1548'. Giving up on it.
No external ftp command available

Please check, if the URLs I found in your configuration file
(http://mirrors.dotsrc.org/cpan/, ftp://mirrors.dotsrc.org/cpan/) are
valid. The urllist can be edited. E.g. with 'o conf urllist push
ftp://myurl/'

Could not fetch authors/id/C/C//C/Ca/Capture/Tiny

I've tried multiple mirrors but they all give the same errors. 我尝试了多个镜像,但是它们都给出相同的错误。 How can I fix this? 我怎样才能解决这个问题?

Try changing your command from cpan Capture/Tiny to cpan Capture::Tiny . 尝试将命令从cpan Capture/Tiny更改为cpan Capture::Tiny If that fails, download the tarball from here , and then run cpanm Capture-Tiny-0.40.tar.gz 如果失败,请从此处下载压缩包,然后运行cpanm Capture-Tiny-0.40.tar.gz

You ran: 你跑了:

cpan Capture/Tiny
#           ^-- notice the slash

The slash tells cpan to look for the distribution file at the specified path. 斜线告诉cpan在指定路径下查找分发文件。 In this case, cpan searches for the distribution file Tiny by author Capture . 在这种情况下, cpan通过作者Capture搜索分发文件Tiny This doesn't exist, so the download fails. 这个不存在,因此下载失败。

Passing a path ( Foo/Bar ) instead of a module name ( Foo::Bar ) lets you install a specific version of a distribution. 通过传递路径( Foo/Bar )而不是模块名称( Foo::Bar ),可以安装特定版本的发行 To install Capture-Tiny-0.41-TRIAL , which is a development version, you would run: 要安装开发版本的Capture-Tiny-0.41-TRIAL ,请运行:

cpan DAGOLDEN/Capture-Tiny-0.41-TRIAL.tar.gz

But you probably just wanted to install the latest non-development version of Capture::Tiny, so you should run: 但是您可能只想安装Capture :: Tiny的最新非开发版本,因此应该运行:

cpan Capture::Tiny

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我通过cpan安装了一个perl模块。 但我该如何使用它? - I installed a perl module via cpan. But how do i use it? 当我尝试使用“make”安装某些东西时,为什么我的权限被拒绝? - Why do I get permission denied when I try use "make" to install something? 当我尝试在Linux上使用64位perl的DBD :: Advantage时,为什么会出现“Error 6060”? - Why do I get “Error 6060” when I try to use DBD::Advantage with a 64-bit perl on Linux? 为什么我在运行 npm 安装时在 bcrypt 中出现错误 404? - Why I get error 404 in bcrypt when I run npm install? 为什么即使我安装了perl-DateTime RPM,当我使用DateTime模块时,“无法在@INC中找到Sub / Identify.pm”? - Why do I get “Can't locate Sub/Identify.pm in @INC” when I use the DateTime module even though I installed the perl-DateTime RPM? cpan安装开关失败 - cpan install switch failed 执行 modprobe 时未找到模块 - Module not found when I do a modprobe 为什么我会收到安装 imposm 的错误? - Why do I get the errors for installing imposm? 如何更新CPAN perl模块 - How to update CPAN perl module 在Linux生产服务器中,当我尝试安装mysql-python模块时出现错误 - In the linux server for production i got error when i try to install mysql-python module
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM