Thursday, October 30, 2008

Installatin of Perl modules

Installatin of Perl modules

Umakanta Samantaray

usamantaray@gmail.com

31st Oct 2008

 

Method 1:- Automatic installation of dependancies

 Step 1:- Login as root, in sudo root login installation will not work. It will search the /root for installation, if you sudo, the home directory will be your home directory.

 Example you want to install below modules

XML::Twig   and Archive::Zip

 

Step 2(optional):-By default it will be with the PERL, to update latest version cpan

Download and install the CPAN tar ball form below site.

http://search.cpan.org/~andk/CPAN-1.9301/lib/CPAN.pm

 

step 3:- type cpan in command prompt

                # cpan

 It will show you below cpan prompt

                 cpan>

                cpan> install XML::Twig

Answer all online answers, if no sence for you, make it default.

              cpan> Archive::Zip

Exit from cpan prompt  

cpan> exit

 

Methos 2:- Instalation manually with all dependancies

 

Search the perl module from below site and install. During installation it may ask for dependency, so again download the dependency, install dependency, then try to install the required perl module

 

Example:- installation of XML::Parser

Download form below site

http://search.cpan.org

 

login as root, or su –l ( not sudo access)

# tar  -zxvf    XML-Parser.2.36.gz

# cd XML-Parser.2.36

# perl Makefile.PL

# make

Check if any dependency is there ( search the dependency in above site download and install as this)

# make test

If everything goes fine without any depndancy or error

# make install

  perl Makefile.PL

      make
      make test

 

Command also can be used        

        make config    # to check if the Makefile is up-to-date

         make clean      # delete local temp files (Makefile gets renamed)

         make realclean  # delete derived files (including ./blib)

         make ci         # check in all the files in the MANIFEST file

         make dist       # see below the Distribution Support section

  

Method 3:- RPM instalation

 Download the RPM for internet and install, But dependency will be the main problem

http://rpm.pbone.net

 

Method 4:-

 Example:

Installation of  Perl-Datetime-TimeZone

 Perl  –CPAN perl-datetime-timezone

Or

Perl  –MCPAN  -e install SOAP::lite

 

Or download from below site and install as follow ( put the required perl  module in search as below

XML::Parser

http://search.cpan.org/~msergeant/XML-Parser-2.36/Parser.pm

 

No comments: