CPAN commandline tool is not working

Discussion in 'Perl Misc' started by skywriter14, Apr 2, 2008.

  1. skywriter14

    skywriter14 Guest

    Dear Group,

    I am using Perl in my Ubuntu machine where CPAN commandline tool is
    acting very strange. Looks like, it is getting false response form all
    or any CPAN mirror. I reconfigured cpan 'urllist' few times with
    different sets of 7/8 urls. But it always stalls and keeps getting 404
    and 500 status from all the mirrors.

    My net connection is OK, I downloaded the same files with wget
    manually, for which cpan gets 404 (01mailrc etc). I cannot do 'install
    Bundle::CPAN' successfully for the same reason, keep getting 404 and
    500 status from all mirrors. I have been downloading source for
    different modules that in need for my current project, one by one all
    day and building them manually, as cpan command is not helping.
    Following dependencies and doing same thigs over and over for each
    module is very frustrating. So it was a very stressful day for me.

    Can anyone suggest what might be the reason and how can I fix my CPAN
    commandline tool? Thanks in advance.

    regards,
    Sumon
     
    skywriter14, Apr 2, 2008
    #1
    1. Advertisements

  2. skywriter14

    Ben Morrow Guest

    Can you show us a log from an attempt to use CPAN? Just running 'reload
    index' in the shell ought to be enough if all fetches are failing. It's
    possible you have an invalid proxy set in your environment, though wget
    generally honours the same environment vars as LWP. It's also possible
    CPAN is using some external command for downloading that is misbehaving.

    Ben
     
    Ben Morrow, Apr 2, 2008
    #2
    1. Advertisements

  3. skywriter14

    skywriter14 Guest

    Can you show us a log from an attempt to use CPAN? Just running 'reload
    Thanks Ben. I fixed the problem by adding main cpan.org in the list.
    And sorry, I cannot show the cpan command logs as I did many things on
    the same terminal, they are gone. Here is the urllist from CPAN's
    MyConfig.pm file.

    'urllist' => [ q[http://search.cpan.org/CPAN/], q[http://
    mirror.lums.edu.pk], q[ftp://cpan.hexten.net/], q[ftp://
    cpan.hostrack.net/pub/CPAN], q[ftp://cpan.llarian.net/pub/CPAN/],
    q[ftp://cpan.mirrors.redwire.net/pub/CPAN/], q[ftp://
    cpan.mirrors.tds.net/pub/CPAN], q[ftp://cpan.netnitco.net/pub/mirrors/
    CPAN/], q[ftp://cpan.erlbaum.net/CPAN/]],

    I added the second url by following search.cpan.org in opera statusbar
    (search.cpan.org is redirecting me in opera to http://mirror.lums.edu.pk
    all day. But even that did not work). Now I added http://search.cpan.org/CPAN/
    in the beginning, and it is working. Not sure why this happened. All
    these mirrors work through wget. Do you understand what was the exact
    problem? Thanks again, I will use 'reload index' next time I hit
    similar problems.
     
    skywriter14, Apr 2, 2008
    #3
  4. skywriter14

    brian d foy Guest

    Can you post a transcript of what you see when you run the cpan(1)
    command?
    If you're getting network errors, it's probably not cpan(1) that's
    having problems. Are you able to reach those sites through another
    means, such as FTP or a browser?
     
    brian d foy, Apr 3, 2008
    #4
  5. skywriter14

    brian d foy Guest

    You could always just run the command again :)
     
    brian d foy, Apr 3, 2008
    #5
  6. skywriter14

    skywriter14 Guest

    Hi Brian,

    :) I do feel like a fool, but CPAN is working alright now. So I cannot
    recreate the same errors again by running the command again. I did not
    want to recreate the problem again to show the output, as I am already
    running behind the work schedule. But I can describe: in general all
    the means of query failed one by one for each mirror, the LWP, then
    Net::FTP and so on.

    I did copy the urls they failed to get (01mailrc... and others), and
    tried with wget and they were downloaded. I am happy that it is
    working now, but do not feel very intelligent because I do not
    understand what exactly went wrong and what exactly fixed it. Again,
    my internet connection was OK all the time. Thanks for the reply
    though. :)
     
    skywriter14, Apr 3, 2008
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.