0

How to install perl module Util.pm .I am missing this module .What is the procedure to install a perl module

Rajeev
  • 251
  • 1
  • 4
  • 10

4 Answers4

2

Regardless of which platform you may be on, you may be able to install the module using the CPAN shell. You can drop down to the CPAN shell by running the command:

perl -MCPAN -e shell

and from there use the install command to fetch and install the module you need installed.

The perldoc for CPAN is helpful in understanding how to use CPAN and what it does and how it works.

You may use the i /Util/ command to search modules and packages that match the given pattern. Or, you could go to search.cpan.org and look for the module you are looking for.

ayaz
  • 483
  • 3
  • 10
2

I really like cpanm, it makes it very easy to install perl mods. Have never had a problem with it and saves me a lot of time.

cd /tmp
wget http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.4008.tar.gz
gunzip App* && tar -xvvf App*
cd App*
perl Makefile.PL
make && make install

( make sure you have gcc installed)

Now all you have to do if you want a mod just cpanm <_MOD_NAME_> ( cpanm POSIX::RT::MQ ) POSIX::RT::MQ is the mod you want / etc

user9517
  • 115,471
  • 20
  • 215
  • 297
chris530
  • 43
  • 5
2

Quite a lot of Perl module are available as rpm packages for CentOS, some in the base repos and quite a few more in rpmforge and epel repos. Easier and faster than using cpan and the module will be updated when you update your CentOS install if an update is available.

See this page for a list of extra CentOS repos.

HampusLi
  • 3,478
  • 17
  • 14
  • I upvoted this answer, because using precompiled binaries is faster and cleaner than using CPAN. Specially on a production server – Bruno9779 Apr 17 '15 at 01:38
1

You might want to install Utils, not Util. The easiest way is to use CPAN. Just type:

cpan install Utils
molnarg
  • 121
  • 2