Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Frustrations with CPAN module installation

by bradcathey (Prior)
on Nov 10, 2003 at 20:31 UTC ( [id://305960]=perlquestion: print w/replies, xml ) Need Help??

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

Fellow Monks,

Trying to learn how to install modules via CPAN. Working in the Terminal on Mac OS 10.3. Type:
cpan> install Bundle::CPAN
It starts trying to fetch with FTP::Net and after all kinds of messages, it fails and kicks me back to the CPAN prompt. Apparently, the 3 ftp sites I selected originally aren't cooperating. Here's a sample:
local: Digest-MD5-2.30.tar.gz remote: Digest-MD5-2.30.tar.gz ftp: local: Digest-MD5-2.30.tar.gz: Permission denied 221 Goodbye. Bad luck... Still failed! Can't access URL ftp://cpan.uky.edu/pub/CPAN...
This is my first attempt to follow all the great advice I've read at the Monastery about using modules. I just need to get it all working.

Questions: Can I re-create my config file so I can find some viable ftp sites? If so, how or where is it and what is it called?

I feel like if I can get through this, I'll discover a whole new world.

—Brad
"A little yeast leavens the whole dough."

Replies are listed 'Best First'.
Re: Frustrations with CPAN module installation
by sweetblood (Prior) on Nov 10, 2003 at 20:37 UTC
    You can re-configure CPAN by typeing

    cpan> o conf init

    from you cpan prompt. Good Luck!

Re: Frustrations with CPAN module installation
by liz (Monsignor) on Nov 10, 2003 at 21:04 UTC
    Maybe it's not the FTP sites, but a firewall issue.

    You might want to do :

    export FTP_PASSIVE=1
    before starting up perl. From the Net::FTP documentation: Passive - If set to a non-zero value then all data transfers will be done using passive mode. This is not usually required except for some dumb servers, and some firewall configurations. This can also be set by the environment variable FTP_PASSIVE.

    Hope this helps.

    Liz

Re: Frustrations with CPAN module installation
by Corion (Patriarch) on Nov 10, 2003 at 21:26 UTC

    The first error message is relatively clear, the second is misleading though :

    ftp: local: Digest-MD5-2.30.tar.gz: Permission denied - this means, that CPAN is trying to download the file to some directory (maybe ~/.cpan/authors/... ?), but can't write there. Check the permissions on the directories and try again. Or maybe you have to run CPAN under some "root" account under OSX, but I don't know that much about OSX and its user structure.
    perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
      Corion, well I fixed the permissions and got much further. However, whether I try to let CPAN do the work or do it myself with gzip and tar and make, I get this error:
      (You get this message, because MakeMaker could not find "/System/Libra +ry/Perl/5.8.1/darwin-thread-multi-2level/CORE/perl.h")
      Ideas?

      Gosh, where does one learn this stuff?

      —Brad
      "A little yeast leavens the whole dough."
        I am not a Mac OS user but I vaguely remember some talk that the Perl header files are not shipped with the default install. The Developer Tools need to be installed.
        Ideas? Gosh, where does one learn this stuff?
        What is there to learn (the message say it all)?

        "/System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE/perl.h" does not exist, which means your perl install is broken.

        All these 3rd party binary installations are really annoying, mostly because people don't know what to do when things break.

        Install perl by compiling it from sources yourself. The various INSTALL files cover everything you need to know.

Re: Frustrations with CPAN module installation
by shockme (Chaplain) on Nov 10, 2003 at 20:38 UTC
    cpan> o conf init
    will walk you back through the configuration.

    Update: sweetblood beat me to. I must be slowing down in my old age ...

    If things get any worse, I'll have to ask you to stop helping me.

Re: Frustrations with CPAN module installation
by freddo411 (Chaplain) on Nov 10, 2003 at 21:30 UTC
    The line:

    ftp: local: Digest-MD5-2.30.tar.gz: Permission denied

    indicates that the directory on your local machine where you are trying to download to is not writable by the user running the cpan process. Figure out where this is, and make it writable to everyone like this: chmod a+w <dirname>

    -------------------------------------
    Nothing is too wonderful to be true
    -- Michael Faraday

Re: Frustrations with CPAN module installation
by bradcathey (Prior) on Nov 10, 2003 at 21:13 UTC
    Thanks sweetblood and shockme. That worked for selecting more ftps. But even after selecting 10 more, nothing is connecting and am getting the same error message as in my original post for all 10! Suggestions?

    —Brad
    "A little yeast leavens the whole dough."

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-26 00:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found