How to install a package in OS X

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • peterv6
    New Member
    • May 2007
    • 8

    How to install a package in OS X

    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!
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    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

    Comment

    • numberwhun
      Recognized Expert Moderator Specialist
      • May 2007
      • 3467

      #3
      Originally posted by peterv6
      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!
      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

      Comment

      Working...