Ubuntu – Cannot fetch files from CPAN

cpanperlUbuntu

I try load modules from CPAN, but it fails

something wrong with my configuration of CPAN, by I can't figure out what is

cpan> install Bundle::CPAN 
CPAN: Storable loaded ok
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
  ftp://cpan.rinet.ru/pub/mirror/CPAN/authors/01mailrc.txt.gz
LWP failed with code[404] message[File '01mailrc.txt.gz' not found]
Fetching with Net::FTP:
  ftp://cpan.rinet.ru/pub/mirror/CPAN/authors/01mailrc.txt.gz
Couldn't fetch 01mailrc.txt.gz from cpan.rinet.ru
Fetching with LWP:
  ftp://cpan.makeperl.org/pub/CPAN/authors/01mailrc.txt.gz
Useless content call in void context at /usr/share/perl5/LWP/Protocol/ftp.pm line 398
LWP failed with code[400] message[FTP return code 000]

file ftp://cpan.rinet.ru/pub/mirror/CPAN/authors/01mailrc.txt.gz exists

EDIT: the problem was that some servers do not allow get files by ftp (ncftpget works ok)
found the server that allow

Best Answer

It looks to me that the file doesn't exist on that FTP server. FTP into it and see if it's there and what the permissions look like. You may need to find a new mirror.

from the CPAN shell, use the 'o conf urllist', 'o conf urllist shift',and 'o conf urllist push http://somenewmirror' commands.

Or a 'o conf init' to run through the initial setup.

Or, find the CPAN/Config.pm file(different if stashed under your home directory) and edit the list directly there.

(most of this answer was found at http://mail.pm.org/pipermail/spug-list/2005-May/006520.html after running http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=LWP+failed+with+code[404]+message[File+'01mailrc.txt.gz'+not+found])