Jasmine Lognnes Jasmine Lognnes - 6 months ago 10
Linux Question

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:

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?

Answer

Try changing your command from cpan Capture/Tiny to cpan Capture::Tiny. If that fails, download the tarball from here, and then run cpanm Capture-Tiny-0.40.tar.gz