In this we will see how to install PERL modules in Linux/Unix. Some times it is required to enhance a program capabilities by including a piece of code. Instead of we writing a code we can check if any modules are available at cpan.org which can be downloaded for free of cost. We can even install a module manually too. In this post we will see how to install a module in both ways.
Make sure that CPAN command is installed in your machine and configured. For steps click here.
Once you configure cpan command we can use it by just typing cpan at the command prompt.
Sep 18, 2008 Install Perl Modules Manually. Download Perl module. Go to CPAN Search website and search for the module that you wish to download. In this example, let us search, download and install XML::Parser Perl module. I have downloaded the XML-Parser-2.36.tar.gz to /home/download.
Output:
or direct cpan install command as shown below.
Output:
From the above it is conformed the module got installed successfully.
Step1: Download your module from cpan.org site to your desired directory(say it /tmp/perl/modules)
Output:
Step 2: Unzipping and untar the module which we downloaded.
Output:
Step 3: Installing a module by using perl command
Output
Step 5: Now run make, make test and make install commands.
Note: It is advisable to install a module through cpan command as it resolves dependencies. Where as this manual process will have dependencies issues. This is similar to rpm and yum commands.
The following two tabs change content below.
![]()
Mr Surendra Anne is from Vijayawada, Andhra Pradesh, India. He is a Linux/Open source supporter who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. He works as Devops Engineer with Taggle systems, an IOT automatic water metering company, Sydney . You can contact him at surendra (@) linuxnix dot com.
Active4 years, 5 months ago
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)
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:
In my case, after locating
Makefile.PL and running
..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
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.
serenesat
4,3261010 gold badges2727 silver badges4747 bronze badges
BryanKBryanK
59722 gold badges99 silver badges2727 bronze badges
3 Answers
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
Community♦
Mike DriverMike Driver
7,47311 gold badge3030 silver badges3636 bronze badges
How To Install Perl Modules In Windows 10
The usual way to install perl modules is using cpan, which should be included on your system. Adobe acrobat xi pro 11.0.20 serial key.
For example:
cpan DBI
AKHollandAKHolland
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:
If you have login as a root user, do not use serenesatserenesat
sudo .
4,3261010 gold badges2727 silver badges4747 bronze badges
How To Install Perl Modules In LinuxNot the answer you're looking for? Browse other questions tagged perlperl-moduledbi or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |