Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Trouble installing modules under Mac OS X

by Anonymous Monk
on Feb 21, 2002 at 05:11 UTC ( [id://146707]=perlquestion: print w/replies, xml ) Need Help??

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

Hey monks,

I built an interactive web site using perl/Apache/SQL on another UNIX system, and have been trying to get it working under OS X.

One problem I'm facing involves installing new modules. Tricycle has written about this problem before, and I've read those postings; but I've tried the recommendations he was given with no success.

I'm getting a lot of errors when I use the CPAN shell to install DBI.pm (to manage connections with a mySQL database). For instance, when I try this in the CPAN shell:

install Bundle::DBI

I get this:

Couldn't open y/build/TIMB000/MANIFEST: No such file or directory at /System/Library/Perl/CPAN.pm line 1806

I'm beyond my depth here. Is the CPAN shell making assumptions about the directory structure that are not true under OS X? It was implied in an earlier posting that installing the Developer Tools CD might clear this problem up, but I've tried that and no dice.

Any insights are appreciated.

  • Comment on Trouble installing modules under Mac OS X

Replies are listed 'Best First'.
Re: Trouble installing modules under Mac OS X
by tfrayner (Curate) on Feb 21, 2002 at 13:12 UTC
    Hi,

    I take it that since you've got this far you've installed the developer tools, which I think was tricycle's problem.

    I've been having related problems doing pretty much the same thing. In the end I installed the DBI and DBD::mysql packages manually. They seem to work fine. The problem I've been seeing with this and other CPAN-based installs is that newer modules apparently depend on perl 5.6.1 rather than the 5.6.0 that ships with OSX. I've compiled perl 5.6.1 and 5.7.2 but they fail a few of the tests run by make test (including one of the POSIX tests) so I'm a bit leery of actually installing them.

    On a side note, the fink project is apparently working on providing the DBI and DBD modules; the relevant modules are in the current-unstable tree. Wait a while and the problem might go away :-)

    Tim

    Update: For completeness, I'll just add this pointer to a previous, more comprehensive thread on MacOSX and perl.

    Update^2 (belated): Having installed perl 5.6.1 using the instructions codified here (which basically say: ignore my above concerns :P), I've found that the perl -MCPAN -e shell route works (almost) flawlessly. The only significant problem so far has been the DB_File module, which is one of the modules which originally failed make test anyway.

    HTH, Tim

      Hi Tim, Thanks for the advice. I've installed the developer tools, but as you found, this did not make all my troubles go away.

      As you suggested, I attempted a manual install of DBI. However, this also generated errors. Running the makefile produces the following error:

      Can't locate Digest/MD5.pm in @INC (@INC contains: blib/arch blib/lib +/System/Library/Perl/darwin /System/Library/Perl/darwin /System/Libra +ry/Perl/darwin /System/Library/Perl /sw/lib/perl5/darwin /sw/lib/perl +5/darwin /sw/lib/perl5 /System/Library/Perl/darwin /System/Library/Pe +rl/darwin /System/Library/Perl /Library/Perl/darwin /Library/Perl/dar +win /Library/Perl /Library/Perl/darwin /Library/Perl /Network/Library +/Perl/darwin /Network/Library/Perl /Network/Library/Perl . /System/Li +brary/Perl/darwin /System/Library/Perl /Library/Perl/darwin /Library/ +Perl /Library/Perl /Network/Library/Perl/darwin /Network/Library/Perl + /Network/Library/Perl .) at blib/lib/MD5.pm line 8. Compilation failed in require at t/md5.t line 8.<P>
      Any advice on resolving this problem? I've got the idea that perl is not configured to look in all the right places for included modules, but am not sure how to fix this.

      Many thanks,

      Kevin

      Edited 2002-02-21 by Ovid

        Hi again,

        I think that perl is looking in the right places; it's just that MD5 is yet another external module you will have to install. If I recall correctly the Digest::MD5 module installed from the perl -MCPAN interface without any problems.

        Unfortunately, as you've discovered, the catch with manual installation is that module dependencies don't get followed automatically. Of course, for a control freak like me, that's a plus :-)

        Tim

Re: Trouble installing modules under Mac OS X
by ellem (Hermit) on Feb 22, 2002 at 01:45 UTC
    I too suffered from this malady. Here's what I did.: (This is available on macosx_perl mailing list as well)

    Here's what I did. I followed the advice of Elaine -HFB- Ashton and l +ooked at my CPAN Config.pm file in it I found that _MY_ Config.pm fil +e had "blanks" next to important settings like tar, unzip and make. +Filling in those blanks fixed CPAN. Here are the steps I took: cd /System/Library/Perl/CPAN sudo perl -MCPAN -e shell At the CPAN shell I typed o conf o conf allowed me to look a my configuration. If you see things like: make then you need to adjust those settings. CPAN can't find make. That's + bad. To figure out where these programs are you can type: which make Which should return: /usr/bin/make Mostly the programs listed in o conf should be in /usr/bin but I would + check. To edit Config.pm you'll need to do something like this: sudo emacs Config.pm (choose the editor of _your_ choice) You'll now see entries like: 'make' => q[ ], You'll want them to look like this: 'make' => q [/usr/bin/make], Not every entry in my Config.pm has a setting. For instance I don't h +ave lynx, and so there's no entry. Keep two terminals open while you + do this. So if here is an entry and you're not sure about it you ca +n do a which #### on the entry to see where/if you have it. Good luck Oh and if you choose emacs CTRL-S will save and CTRL-C will get you o +ut of emacs.
    The OP of that thread was a newbie who had a lot of trouble with even the text editor so please forgive all the emacs advice salt and peppered thoughout.
    Sorry about the formatting but I was too lazy to make it pretty and I love using the code tags!
    --
    ellem@optonline.net
    There's more than one way to do it, just don't use my way.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-25 19:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found