Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Problem Starting CPAN Shell with ftp.perl.org

by monkfan (Curate)
on Aug 31, 2008 at 07:15 UTC ( #708005=perlquestion: print w/ replies, xml ) Need Help??
monkfan has asked for the wisdom of the Perl Monks concerning the following question:

Dear fellow monks,

I wanted to start a new CPAN prompt installation in my new Linux PC. However I found this following problem especially in accessing ftp.perl.org.

How can I resolve this?

This is the message I got.
$ perl -MCPAN -e shell /home/monkfan/.cpan/CPAN/MyConfig.pm initialized. CPAN is the world-wide archive of perl resources. It consists of about 100 sites that all replicate the same contents all around the globe. Many countries have at least one CPAN site already. The resources found on CPAN are easily accessible with the CPAN.pm module. If you want to use CPAN.pm, you have to configure it properly. If you do not want to enter a dialog now, you can answer 'no' to this question and I'll try to autoconfigure. (Note: you can revisit this dialog anytime later by typing 'o conf init' at the cpan prompt.) Are you ready for manual configuration? [yes] # ...EVERYTHING GOES SMOOTHLY UNTIL..... If you're accessing the net via proxies, you can specify them in the CPAN configuration or via environment variables. The variable in the $CPAN::Config takes precedence. Your ftp_proxy? Your http_proxy? Your no_proxy? You have no /home/ewijaya/.cpan/sources/MIRRORED.BY I'm trying to fetch one CPAN: LWP::UserAgent loaded ok Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz 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 Trying with "/usr/bin/lynx -source" to get ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY Looking up ftp.perl.org Making FTP connection to ftp.perl.org Alert!: Unable to connect to FTP host. Looking up ftp.perl.org Making FTP connection to ftp.perl.org Alert!: Unable to connect to FTP host. Can't Access `ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY' Alert!: Unable to access document. lynx: Can't access startfile Trying with "/usr/bin/lynx -source" to get ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz Looking up ftp.perl.org Making FTP connection to ftp.perl.org Alert!: Unable to connect to FTP host. Looking up ftp.perl.org Making FTP connection to ftp.perl.org Alert!: Unable to connect to FTP host. Can't Access `ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz' Alert!: Unable to access document. lynx: Can't access startfile Trying with "/usr/bin/ncftpget" to get ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY Could not connect to ftp.perl.org -- try again later: Connection timed + out. Could not connect to ftp.perl.org -- try again later: Connection timed + out. Could not connect to ftp.perl.org -- try again later: Connection timed + out. ncftpget: cannot open ftp.perl.org: could not connect to remote host, +but can try again. Trying with "/usr/bin/ncftpget" to get ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz Could not connect to ftp.perl.org -- try again later: Connection timed + out. Could not connect to ftp.perl.org -- try again later: Connection timed + out. Could not connect to ftp.perl.org -- try again later: Connection timed + out. ncftpget: cannot open ftp.perl.org: could not connect to remote host, +but can try again. Trying with "/usr/bin/wget -O -" to get ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY --15:57:57-- ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY => `-' Resolving ftp.perl.org... 163.143.1.21 Connecting to ftp.perl.org|163.143.1.21|:21... failed: Connection time +d out. Retrying. --16:01:07-- ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY (try: 2) => `-' Connecting to ftp.perl.org|163.143.1.21|:21... failed: Connection time +d out. Retrying. --16:04:18-- ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY (try: 3) => `-' Connecting to ftp.perl.org|163.143.1.21|:21... failed: Connection time +d out. Retrying. --16:07:30-- ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY (try: 4) => `-' Connecting to ftp.perl.org|163.143.1.21|:21... failed: Connection time +d out. Retrying. --16:10:43-- ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY (try: 5) => `-' Connecting to ftp.perl.org|163.143.1.21|:21... #...THIS KEPT GOING ON AND ON ENDLESSLY....

Regards,
Edward

Comment on Problem Starting CPAN Shell with ftp.perl.org
Download Code
Re: Problem Starting CPAN Shell with ftp.perl.org
by Corion (Pope) on Aug 31, 2008 at 07:36 UTC

    You seem to have a network problem, either with ftp in general or when connecting to ftp.perl.org. Debug your network problem or configure CPAN to use another CPAN mirror manually. You can also fetch the MIRRORED.BY manually and put it in the right place.

Re: Problem Starting CPAN Shell with ftp.perl.org
by bart (Canon) on Aug 31, 2008 at 14:23 UTC
    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.

      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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://708005]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2014-09-19 20:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (145 votes), past polls