Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Perl errors on Mac OSX Lion

by T-Fen (Acolyte)
on Jun 08, 2012 at 23:41 UTC ( [id://975255]=perlquestion: print w/replies, xml ) Need Help??

T-Fen has asked for the wisdom of the Perl Monks concerning the following question:

Hi all- OK, so trying to get t-prot installed but appears there is an issue with a missing Perl module/component. New to Perl and cpan, so bear with me. When I try to read a message in mutt with t-prot installed and sourced, I get the following error when trying to read a message:
Fetching message...Can't locate Locale/gettext.pm in @INC (@INC contains: /Library/Perl/5.12/darwin-thread-multi-2level /Library/Perl/5.12 /Network/Library/Perl/5.12/darwin-thread-multi-2lev +el /Network/Library/Perl/5.12 /Library/Perl/Updates/5.12.3/darwin-thread-multi-2level /Library/Perl/Updates/5.12.3 /System/Library/Perl/5.12/darwin-thread-multi-2level /System/Library/Perl/5.12 /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level /System/Library/Perl/Extras/5.12 .) at /usr/local/bin/t-prot line 1123 +. Could not copy message
So looks like I'm missing Locale/gettext.pm. When I search for this on the cpan search page, I get Locale::gettext (what I assume I need). When I try to install with 'sudo cpan Locale::gettext' I get:
Going to read '/Users/trey/.cpan/Metadata' Database was generated on Fri, 08 Jun 2012 14:58:04 GMT Running install for module 'Locale::gettext' Running make for P/PV/PVANDRY/gettext-1.05.tar.gz Checksum for /Users/trey/.cpan/sources/authors/id/P/PV/PVANDRY/gettext-1.05.tar.gz +ok CPAN.pm: Going to build P/PV/PVANDRY/gettext-1.05.tar.gz checking for gettext... no checking for gettext in -lintl... no gettext function not found. Please install libintl at Makefile.PL line 18. Warning: No success on command[/usr/bin/perl Makefile.PL] PVANDRY/gettext-1.05.tar.gz /usr/bin/perl Makefile.PL -- NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install
Looks like the above suggest I should install 'libintl' which appears to be provided by Log::Report::Translator::Gettext (which is already installed) So...I'm at a loss. Any help greatly appreciated.

Replies are listed 'Best First'.
Re: Perl errors on Mac OSX Lion
by bitingduck (Chaplain) on Jun 09, 2012 at 05:00 UTC

    First off, are you using the system Perl or have you installed your own? You generally don't want to install things in the system Perl-- the system depends on the Perl that came with it being the way it expects it to be. I'm not up to Lion yet, Snow Leopard shipped with 2 or 3 versions, depending on whether you have a 32 or 64 bit machine: 5.8.9 (32 bit), 5.10.0 (32 bit) and 5.10.0 (64 bit). I'm still on an old 32 bit machine, and managed to install a lot of modules into the 5.10.0 version without breaking anything (I vaguely recall that the system depends more on the 5.8.9 build, but I could be wrong there), but did have some problems with compatibility with some modules not behaving, even though I had all the pre-reqs installed

    Your best bet is to install your own version of Perl and add your modules to that. There used to be a lot of pages floating around with instructions as to the best way to do it, but now Perlbrew seems to be the most convenient. It lets you install multiple versions of Perl and switch easily between them. It also comes with cpanp, which works quite well

    If you want to go ahead and add modules to your existing install, you might (or might not) have better luck running CPAN in shell mode-- I've pretty much always done it that way and it generally will prompt for pre-reqs as it goes. You can get there with sudo perl -MCPAN -e shell and then install away from there.

Re: Perl errors on Mac OSX Lion
by ikegami (Patriarch) on Jun 09, 2012 at 00:04 UTC
    It's talking about the C library libintl. It's likely that one of the packages in your system's package manager provides it. Sorry, I'm not a OSX user.
Re: Perl errors on Mac OSX Lion
by kcott (Archbishop) on Jun 09, 2012 at 13:14 UTC
Re: Perl errors on Mac OSX Lion
by snape (Pilgrim) on Jun 08, 2012 at 23:58 UTC

    Try installing Locale::gettext using cpanp. Cpanp is better in installing modules as compared cpan. Do the following

    1. sudo cpanp : You will get into cpan terminal

    2. On the terminal type install Locale::gettext

    Hopefully it will install the module. Also, have a look to A Guide to Installing Modules

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-03-29 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found