By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,541 Members | 1,455 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,541 IT Pros & Developers. It's quick & easy.

How to install a package in OS X

P: 8
I'm new to OS X & Perl in general and have no experience in installing packages. I got the following message: "Can't locate Mysql.pm in @INC". I assume I need to install the Mysql.pm. Can someone post a simple step-by-step list of how to do this for me? I'd really appreciate it. Or, maybe better, point me to a reference on how to install packages?
Thanks much!
May 16 '09 #1
Share this Question
Share on Google+
2 Replies


gpraghuram
Expert 100+
P: 1,275
Hi,
The first step would be downloading the package from the website www.search.cpan.org
Then extract the zip or gz file.
run the command
perl MAKEFILE.pl prefix <your path>
make
make test
make install

Then you shuld set the PERL5LIB variable properly with the ptah where u installed the PM.

Raghu
May 19 '09 #2

numberwhun
Expert Mod 2.5K+
P: 3,503
@peterv6
Another way would be to use the CPAN interface that comes with Perl. This is easier, especially if you haven't installed software before on a Unix based OS.

The interface is pretty simple to setup, I usually just take the defaults as I am not doing anything extremely specialized and after that, its just a matter of doing an "install <module_name>".

Either way, when you get an error that "something.pm" was not found in @INC, that usually means that the module you were trying to use is not installed and if it is, then the path is not listed in @INC and you need to get it into the @INC path. (fyi, @INC can really only be modified at installation of Perl).

Regards,

Jeff
May 20 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.