Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Problem Starting CPAN Shell with ftp.perl.org

by bart (Canon)
on Aug 31, 2008 at 14:23 UTC ( [id://708036]=note: print w/replies, xml ) Need Help??


in reply to Problem Starting CPAN Shell with ftp.perl.org

On a lot of corporate firewalls, FTP is blocked by default. Try HTTP instead.

I don't think it's still the case with the most modern distributions, but the old CPAN was setup by default to only try FTP. Which is... aaaaargggghhhh!! just infuriating.

  • Comment on Re: Problem Starting CPAN Shell with ftp.perl.org

Replies are listed 'Best First'.
Re^2: Problem Starting CPAN Shell with ftp.perl.org
by monkfan (Curate) on Sep 02, 2008 at 06:04 UTC
    Try HTTP instead.
    Hi Bart,
    How do you do that?

    Regards,
    Edward
      How do you do that?
      By adding HTTP URLs in the URL-list. The main tool to manage that list is "o conf" in the CPAN shell.

      You can see the current contents (under "urllist") with just "o conf", or, more limited in output, with "o conf urllist".

      You can replace the whole URL-list with, for example (this is the contents I have, which must have been put there by default):

      o conf urllist http://ppm.activestate.com/CPAN http://cpan.perl.org

      You can also add a URL to the existing list with shift and push, like this:

      o conf urllist push http://cpan.perl.org o conf urllist unshift http://cpan.perl.org
      or drop the first or last entry resp. with
      o conf urllist shift o conf urllist pop

      You must save the changes with

      o conf commit
      or you can rollback (after a disastrous mistake) with
      o conf defaults

      HTH.

        Thank you very much for step by step instructions. I am a perl / Linux newbie and was trying to get some perl modules installed for past 2 days. Even though my firewall was allowing ftp, somehow I couldn't download the required modules using ftp. As soon as i added https to my cpan config file, things worked flawlessly. Thanks again
        Um. . .if you could get to a CPAN shell without going through this we wouldn't be having this conversation, right?

        after much frustration, the following worked for me:

        1. cpan <-- answer "no" to initial setup.
          This allows (auto configured) Config.pm file (see below) to be initialised. Previously I think this file had "1;" or something helpful in it!
        2. I then added:
          'dontload_hash' => {"Net::FTP" => 1, "LWP" =>1 }, # disable Net::FTP + and LWP which usually hang to: /usr/lib/perl5/5.8.8/CPAN/Config.pm - see section: $CPAN::Config = { ...
          but this alone did not seem to do the job. I'm still not sure if this step had any effect.
        3. (in cpan shell)
          o conf urllist http://ppm.activestate.com/CPAN http://cpan.perl.org o conf commit quit

        worked for me - thanks!

        20100528 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips

        So I did ... # perl -MCPAN -e 'shell' And then ... cpan> o conf urllist http://ppm.activestate.com/CPAN http://cpan.perl.org cpan> exit Terminal does not support GetHistory. Lockfile removed. But when I do # cpan I still get ... Fetching with Net::FTP: ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY Fetching with Net::FTP ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://708036]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-04-19 22:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found