Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Installing modules

by Chuma (Beadle)
on Jan 28, 2012 at 16:38 UTC ( #950519=perlquestion: print w/replies, xml ) Need Help??

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

Dear monks,

After one week of learning Perl, I basically gave up on Java and all those other messy languages. Now, after five years or so, I still have one slight problem: Installing modules.

Right now, for example, I'm looking at the "Guide to installing Modules" ( I've picked the module GD::Simple, because I hear graphics is something that computers can do these days. I've just made a breakthrough and run Makefile.PL successfully, as far as I can tell. I try "make", and it says

make: *** No rule to make target `/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE/config.h' +, needed by `Makefile'. Stop.

I also tried using the CPAN earlier today. It tells me ever so informatively that it "had some problems".

Can you help me getting it to work? Either method? Or some other method? I'm not picky, but it would be nice to be able to use modules. Any modules, really. Thank you in advance.

Using Mac OS 10.6.8, Perl 5.10.0.

Replies are listed 'Best First'.
Re: Installing modules
by mbethke (Hermit) on Jan 28, 2012 at 16:48 UTC

    I don't really have much of a clue about OSX but it looks like your Perl installation was incomplete. It should install this config.h file to let compiled modules know with what options your Perl was compiled. Is that the system Perl? Unfortunately, these are often quite bastardized and rendered unusable for more than running the system scripts by vendors. I don't know whether the Fink project is still a source of OSS that people use on Macs but when I last did that was where I looked for stuff like this.

      So I need to reinstall Perl, or something?

      Okay, I've downloaded and installed the latest Activeperl. It installed happily, but "perl -v" still says the version is 5.10.0. Do I have two different versions now, or what?

        Yes, I suppose so. That just calling "perl" still finds the old version is a path problem; ActivePerl probably adds its bin directory to the end of the $PATH variable, if at all.

        To make sure you don't break any system stuff, you could make yourself a $HOME/bin directory and add that to PATH in your .bashrc, then make a softlink in there to the ActivePerl binary.

Re: Installing modules
by kielstirling (Scribe) on Jan 28, 2012 at 23:11 UTC

    I am in no way an ActiveState expert .. however, I did play around with it some time ago. It has a UI for installing cpan modules

    Read how-install-cpan-modules-activeperl

    -Kiel R Stirling

      Sounds nice, but the command "ppm" is not found, so I guess some path thing hasn't been set right or something.

      It also says on that page that ActivePerl comes with graphics libraries included. I'd still like to be able to install modules, of course, but maybe the whole exercise of installing GD specifically is a little pointless if it's already installed. If I understand it right, I now have both ActivePerl and the other Perl (as well as the older version which the other users are stuck with). But where are they? How do I access ActivePerl instead of the other one?

        With your vendor's or system's perl, you'd normally just enter perl; however, with ActivePerl, unless you specifically changed policy to make it your system perl, you have to use the full path to ActivePerl. On my system, the full path is

        Your path will most likely be different. To use ppm, again you'd do something similar such as:
        /opt/ActivePerl-5.14/bin/ppm install Some::Module
Re: Installing modules
by Chuma (Beadle) on Jan 30, 2012 at 00:42 UTC
    Okay, latest update:

    Apparently, I now have three Perl versions. There's one in my user folder, which knows SDL but not GD, one ActivePerl which knows GD but not SDL, and one default Perl which doesn't know anything. The one in my user folder also has the distinct disadvantage of not being available to other users. This is not ideal. My questions at this time:

    1. Is there any way to unite the Perls?
    2. If not, is there a way to make the one in my user folder available for all users? Or, failing that, for one other user? Can I just copy it? I'd rather not, since all these Perl versions are starting to fill up my hard drive, but if that's the only way.
    3. How do I get ActivePerl to use SDL?
    4. How do I get plain Perl to use GD?
    5. After I download a package and install it, does that mean I can throw away the downloaded stuff?
    6. How do I get rid of the Bash errors?

    Come to think of it, I don't know if GD or SDL is what I need. I just want to be able to make a simple GUI. Windows, buttons, that sort of thing. What module should I be using, anyway? Or maybe I should start a different node for that...

    Anyway, thank you for your patience, dear monks.

Re: Installing modules
by Chuma (Beadle) on Jan 31, 2012 at 23:31 UTC
    I think I fixed the Bash errors. It's possible that I destroyed something important in the process, but at least the errors are gone. Very pleased with myself.

    I also finally managed to install the non-Active version on my main user as well, so I guess I can basically use it now. If I want to use both those modules I guess I'll just have to make two scripts and have them call each other through the shell.
    "Making easy things easy and basic graphics programming insanely complicated."

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2021-01-22 13:20 GMT
Find Nodes?
    Voting Booth?