Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Configuring Mac OS X to Install Perl Modules

by Corion (Pope)
on Sep 22, 2007 at 07:43 UTC ( #640490=note: print w/replies, xml ) Need Help??

in reply to Configuring Mac OS X to Install Perl Modules

You should install DateTime the same way you installed the other modules:

# from the shell / Terminal window cpan DateTime

or within the CPAN shell as

install DateTime

DateTime needs Params::Validate as a prerequisite and the cpan program will hunt down all these prerequisites for you automatically and install them for you if you let it.

The default CPAN configuration is to ask whether to install prerequisites, but you might want to check that or change it from ask to follow so all prerequisites get installed without asking. Type in the cpan shell:

o conf prerequisites_policy

check that it's ask or follow and to set the new policy to follow type

o conf prerequisites_policy follow

Then type

o conf commit

to save the current configuration if you want it to remain.

Replies are listed 'Best First'.
Re^2: Configuring Mac OS X to Install Perl Modules
by Anonymous Monk on Feb 08, 2010 at 07:11 UTC

    These posts pointed me in the write direction. Hopefully, this clarification can help someone else fix this same problem.

    To install DateTime on Mac

    1. read the original post from Perrmoss and the reply by Corion for background info
    2. sudo CPAN
    3. go through configuration (if needed) press enter for most options except:
    4. choose "follow" for the prerequisite policy (instead of ask)
    5. personally, I made the recommended/common choices to some of the options (like UNINST=1)
    6. Now here's the key:

    7. Try to install DateTime. Every time you see an error, install the package that's missing by:
      • Looking for text along the lines of
      • Can't locate Params/ in @INC (@INC


        Can't locate DateTime/ in @INC (@INC

      • Take the "Params/" part and convert it to Params::Validate
      • and run the corresponding command in CPAN: install Params::Validate

    For me to get the DateTime module to install I had to run the following, first:

    install Params::Validate

    install DateTime::Locale

    install DateTime::TimeZone

    Keep following that pattern and you'll get it installed, finally!!!

      In addition to everything I wrote above, I also needed to run install Test::Exception

      So the final, full list of everything I command I ran to install DateTime on my MacBook Pro OS X 10.5.8, that has never before used perl

      1. sudo CPAN (press enter lots of times to config)
      2. install Params::Validate
      3. install DateTime::Locale
      4. install DateTime::TimeZone
      5. install Test::Exception
      6. install Test::Warn
      7. install DateTime::Format::ICal
      8. and FINALLY:

      9. install DateTime

      Sadly, I have no idea what I just did. All I know is it worked for me and I moved on to successfully finish setting up bugzilla.

      I hope this helps someone else out there (the way the posts in this thread lead me to figure this thing out)

      - Kevin G. a.k.a. gMale

        I also needed to install Test::More. Otherwise I got some nonsense about "You tried to run a test without a plan".
        I just wanted to say thanks, and also to let others know that almost 3 years later, this worked perfectly for me on Snow Leopard.
        If I try to install DateTime, I get this: lizxp-4:~ lizx$ cpan DateTime CPAN: Storable loaded ok (v2.18) Going to read /Users/lizx/.cpan/Metadata Database was generated on Fri, 06 Jan 2012 20:10:31 GMT CPAN: YAML loaded ok (v0.78) Going to read /Users/lizx/.cpan/build/ ............................................................................DONE Found 35 old builds, restored the state of 35 Running install for module 'DateTime' Running Build for D/DR/DROLSKY/DateTime-0.72.tar.gz Prepending /Users/lizx/.cpan/build/JSON-PP-2.27200-mFYxJ8/blib/arch /Users/lizx/.cpan/build/JSON-PP-2.27200-mFYxJ8/blib/lib to PERL5LIB for 'get' Has already been unwrapped into directory /Users/lizx/.cpan/build/DateTime-0.72-LkeH0n Prepending /Users/lizx/.cpan/build/JSON-PP-2.27200-mFYxJ8/blib/arch /Users/lizx/.cpan/build/JSON-PP-2.27200-mFYxJ8/blib/lib to PERL5LIB for 'make' Could not make: Unknown error Prepending /Users/lizx/.cpan/build/JSON-PP-2.27200-mFYxJ8/blib/arch /Users/lizx/.cpan/build/JSON-PP-2.27200-mFYxJ8/blib/lib to PERL5LIB for 'test' Running Build test Can't test without successful make Running Build install Make had returned bad status, install seems impossible ---- I don't know what else to try.
        Had to do Install Module::Runtime before everything else.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://640490]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2018-03-23 17:05 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (294 votes). Check out past polls.