[英]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?
我怎样才能解决这个问题?
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.