Saturday, November 14, 2009

Solution to CPAN hangs on Fetching with LWP:

When I tried to fetch stuff with CPAN it started hanging right away
Fetching with LWP:
  ftp://ftp.planetmirror.com/pub/perl/CPAN/modules/02packages.details.txt.gz
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
/etc/perl/Net/libnet.cfg
Edit that file and change the ftp_int_passive setting to 1.

2 comments:

  1. Or set the option to 0, if you are not behind an NAT router, and it does not work with 1.

    ReplyDelete
  2. If it doesn't work with 1, then the ftp server would be incorrectly configured.

    ReplyDelete