pkfox has asked for the wisdom of the Perl Monks concerning the following question:

Hi All, I installed Strawberryperl on my Windows 7 laptop today without a problem, however when I try to install a module using cpan it always fails - after several error messages such as LWP failed with code500 messagecan't connect to strawberryperl.com:80 <connect timeout> could this be a firewall issue ? I'm on a corporate server so it wouldn't surprise me - what port(s) does cpan need opening ? TIA

Replies are listed 'Best First'.
Re: CPAN not working
by marto (Cardinal) on Dec 02, 2011 at 13:25 UTC

    The CPAN documentation has a section concerning firewalls, likely if you read that, ascertain what sort of firewall you have and take the following advice it'll work. If in doubt contact your network/sys admin.

Re: CPAN not working
by ansh batra (Friar) on Dec 02, 2011 at 13:30 UTC
    see your cpan configuration settings
    run this on ur cpan shell
    o conf init urllist
    and see the url list
    also do "connect to internet ok" as your cpan settings
    also see this
      o conf init urllist

      Did you try running this, it doesn't display the urllist values as you suggest ("and see the url list") that would be o conf urllist, the command you suggest will initialise the urllist settings, prompt the user to connect to the internet so that cpan can suggest some mirrors or alternatively let them supply their own. Regardless, this won't help if they can't get internet access due to firewall restrictions, unless they host a cpan mirror accessable to them on their internal network.

Re: CPAN not working
by dasgar (Priest) on Dec 02, 2011 at 19:35 UTC

    Since you mentioned that you're on a corporate network at your job, it's possible that in addition to a corporate firewall, your employer may also have some proxy server(s) that you would need to route your traffic through. If that's the case, you'll need to get that info added to the CPAN configuration or else it won't get to the outside world to get the modules that you want to install.