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

PPM/CPAN connection issues

by technojosh (Priest)
on Aug 18, 2011 at 21:07 UTC ( [id://921079]=perlquestion: print w/replies, xml ) Need Help??

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

Dearest Monks,

I am driving myself crazy in a new contract I'm working on... I am obviously behind a firewall/proxy in this shop, however i am more than a little confused at something -->
I cannot seem to add any modules or even find them through PPM or CPAN shells. I can go right to the repositories online and download the files, even using the same URLs that fail in the shell...

I am using ActiveState Perl 5.12.4

When I use PPM, the activestate repository always reads "0" modules and I'm unable to add anything not "in the box"

When I run CPAN shell, I have tried setting the following config options:

  • o conf http_proxy http://myautoproxy.mycompany.com/
  • o conf proxy_user MYDOMAIN\\Me
  • o conf proxy_pass MyPassword

Which gets me this far:
(example is searching for Test::Simple module)
cpan> i test::simple Fetching with LWP: http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz LWP failed with code[404] message[Not Found] Warning: no success downloading 'C:\Perl\cpan\sources\authors\01mailrc +.txt.gz.tmp8008'. Giving up on it. Fetching with LWP: http://cpan.perl.org/authors/01mailrc.txt.gz LWP failed with code[404] message[Not Found] Warning: no success downloading 'C:\Perl\cpan\sources\authors\01mailrc +.txt.gz.tmp8008'. Giving up on it. Warning: no success downloading 'C:\Perl\cpan\sources\authors\01mailrc +.txt.gz.tmp8008'. Giving up on it. No external ftp command available Fetching with LWP: http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz LWP failed with code[404] message[Not Found] Warning: no success downloading 'C:\Perl\cpan\sources\authors\01mailrc +.txt.gz.tmp8008'. Giving up on it. Fetching with LWP: http://cpan.perl.org/authors/01mailrc.txt.gz LWP failed with code[404] message[Not Found] Warning: no success downloading 'C:\Perl\cpan\sources\authors\01mailrc +.txt.gz.tmp8008'. Giving up on it. Warning: no success downloading 'C:\Perl\cpan\sources\authors\01mailrc +.txt.gz.tmp8008'. Giving up on it. No external ftp command available Please check, if the URLs I found in your configuration file (http://ppm.activestate.com/CPAN, http://cpan.perl.org) are valid. The urllist can be edited. E.g. with 'o conf urllist push ftp://myurl/' Could not fetch authors/01mailrc.txt.gz

As an effort in troubleshooting, I have browsed to every single URL in the above CPAN output. If I copy the complete "01mailrc.txt.gz" URL to my browser's address bar and hit enter: I get the GZ file complete with all the email addresses and names of cpan authors. Both of the (http://ppm.activestate.com/CPAN, http://cpan.perl.org) URLs work from my browser as well.

  • What.IN.the.H***. is getting in my way here?
  • What else can I try to get around this so I can move on extending my perl environment??

  • Also worth noting: If I don't configure any proxy stuff, I get "bad hostname" errors after every attempt to load something
    Fetching with LWP: http://cpan.perl.org/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to cpan.perl.org:80 (B +ad hostname)]

    Replies are listed 'Best First'.
    Re: PPM/CPAN connection issues
    by Marshall (Canon) on Aug 18, 2011 at 22:40 UTC
      I am using ActiveState Perl 5.12.4
      If you working with an ActiveState installation, I would not use the cpan shell unless you have to.

      Depending upon the module, ActiveState may have done a lot of work past what you would get with cpan (that is definitely true on Windows!). If they have a pre-built installation (which may include binary code .so's, .dll's), use it!

      It appears that there is a proxy issue here and they can be hard to resolve. The easy thing to do for a module in the Active State repository is to download the .ppd file. Then use the command line version of ppm (perl package manager) to install it. Type ppm ? at the command prompt to learn how.

      Also note that there are multiple .ppd repositories. Active State has a big one, but it is just one of many. Not everything that is available as a .ppd is available as a .ppd on the Active State repository. There is a package on the Active State site that their ppm program uses which will tell you these other "well known" sites - mainly Canadian.

        I tried the CPAN shell after PPM gave me the issue. I just thought the errors from CPAN were more helpful to post here...

        I will try the .ppd idea. I downloaded the .ppd I want, along with the corresponding .gz file.

        Update: This solution worked! Many thanks! (I ended up in a wormhole of dependency installations, but after 7 or so were fixed using the .ppd install method...) I got the module I wanted installed and a simple test works!

          The below link worked. Thanks http://docs.activestate.com/activeperl/5.6/faq/ActivePerl-faq2.html#ppm_and_proxies
          Hi, I have exactly the same problem with the same libraries (File::Slurp & JSON:XS to install) I tried by ppm first then cpan with the same errors I've download the .ppd file on "www.cpan.org" Could you describe what you've done for the installation? Command lines and dependencies to install?
    Re: PPM/CPAN connection issues
    by Anonymous Monk on Aug 18, 2011 at 21:11 UTC
      In an effort to debug, try
      lwp-request -m get -USsed http://ppm.activestate.com/CPAN/authors ht +tp://cpan.perl.org/authors
        Thanks for the response. See below for the output from your suggestion

        GET http://ppm.activestate.com/CPAN/authors User-Agent: lwp-request/6.00 libwww-perl/6.02 500 Can't connect to ppm.activestate.com:80 (Bad hostname) Content-Type: text/plain Client-Date: Thu, 18 Aug 2011 21:13:37 GMT Client-Warning: Internal response GET http://cpan.perl.org/authors User-Agent: lwp-request/6.00 libwww-perl/6.02 500 Can't connect to cpan.perl.org:80 (Bad hostname) Content-Type: text/plain Client-Date: Thu, 18 Aug 2011 21:13:39 GMT Client-Warning: Internal response

    Log In?
    Username:
    Password:

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

    How do I use this?Last hourOther CB clients
    Other Users?
    Others wandering the Monastery: (6)
    As of 2024-04-23 10:58 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found