Reputation: 1221
This is my first time installing a Perl module and I'm having some trouble. I'm trying to install manually In UNIX. These are the steps I am following (Installing DBI module in this case)
Download DBI-1.628.tar.gz tar file,
Uncompress file with
$ tar -zxvf DBI-1.628.tar.gz
So far no problems,
Its the next step that is confusing me... In every tutorial I've seen so far I'm told to locate Makefile.PL
then run the following commands:
$ perl Makefile.PL
$ make
$ make test
$ make install
In my case, after locating Makefile.PL
and running
$ perl Makefile.PL
...some output follows. I get these messages
Checking if your kit is complete... Looks good
& Writing Makefile for DBI
Then I'm back in my user command prompt. Note I still haven't entered these commands
$ make
$ make test
$ make install
From the command prompt if I enter the make
command now I get a -bash: make: command not found
error.
I'm an absolute beginner at this so please excuse me If I am missing something rudimentary.
Upvotes: 1
Views: 2502
Reputation: 4709
The simplest way to get Perl modules installed is to use the CPAN module itself.
Run the Perl CPAN module via command line perl and get it installed in a single line:
sudo perl -MCPAN -e 'install Module::Name'
If you have login as a root user, do not use sudo
.
Upvotes: 0
Reputation: 8511
If you're using MAC OSX, just fire up a terminal and type 'cpan'. Allow it to configure automatically and do some stuff, then you can install modules by just typing install Your::Module::Name
. To get out of cpan just hit ctrl-c or type quit
.
You can also install directly from the command line by using cpan -i 'Your::Module::Name'
.
NB: You may need to type sudo cpan
and put in your password rather than just cpan on it's own depending how your mac is configured.
Simply to get the make
command on a mac, you need to go to the app store and install the latest version of XCode, then turn on the 'command line utilities' option. See more on that here: Xcode 4.4 and later install Command Line Tools
Upvotes: 4
Reputation: 4445
The usual way to install perl modules is using cpan, which should be included on your system.
For example:
cpan DBI
Upvotes: 0