Thursday, September 14, 2006

i started seeing this error when i used CPAN to fetch stuff:


Fetching with LWP:
ftp://ftp.planetmirror.com/pub/perl/CPAN/modules/02packages.details.txt.gz
LWP failed with code[400] message[FTP return code 000]
Fetching with Net::FTP:
ftp://ftp.planetmirror.com/pub/perl/CPAN/modules/02packages.details.txt.gz
Couldn't fetch 02packages.details.txt.gz from ftp.planetmirror.com
Fetching with LWP:
ftp://cpan.nas.nasa.gov/pub/perl/CPAN/modules/02packages.details.txt.gz
LWP failed with code[400] message[FTP return code 000]
Fetching with Net::FTP:
ftp://cpan.nas.nasa.gov/pub/perl/CPAN/modules/02packages.details.txt.gz
Couldn't fetch 02packages.details.txt.gz from cpan.nas.nasa.gov
Fetching with LWP:
ftp://cpan.llarian.net/pub/CPAN/modules/02packages.details.txt.gz


• rootless solution:

add string

export FTP_PASSIVE=1

to your profile (~/.profile)

• permanent solution for all users with editing system files (needs root):

the fix for linux is simple but not particularly easy to track down.

this is likely happening because you are behind a NAT or firewall, and you need to do ftp in passive mode.

find your perls libnet.cfg file:

% locate libnet.cfg
/usr/local/share/perl/5.6.1/Net/libnet.cfg

edit that file and change the ftp_int_passive setting to 1.

No comments: