Perl Modules Installation Guide

Please have a look into perl/cpanfile in the root of the installation-kit we delivered to you. It will list all required modules and can be used with cpanm as well to automatically install all dependencies (more details are below).

Installation of Missing Perl Modules

If any of the required Perl modules are not installed on your system, the check-script will stop and tell you what’s missing.

Try to install the missing module either with your operating-systems package-manager (deb, apt, yast, rpm, yum, …) which should be the preferred way. You can also use cpanm or the cpan-shell and using all methods on the same system is mostly ok too.

The already mentioned cpanfile is the perfect source for the names of all required modules. Beside of this it can be also used to install all of them at once using cpanm.

Installing Perl Modules with yum

As an example we install the Sereal-module with the following command:

$ yum install perl-Sereal.noarch

Of course this will not work if your version of CentOS does not provide the rpm for Sereal. If this rpm is missing or can not be found you can install Sereal with cpanm or the cpan-shell (see below).

Installing all required Perl modules with cpanm

If you have cpanm available on the system the installation of all required Perl modules is fairly simple:

$ cd /usr/local/check_netapp_pro/perl
cpanm --installdeps .

The program cpanm reads the file ./cpanfile contained in the tarball and installs all the modules listed in that file.

You must cd into the directory where the cpanfile resides before running cpanm --installdeps . (also mind the dot at the end of the command).

See Installation of cpanminus below, if cpanm is not already installed on your system.

Installing Perl Modules with the CPAN-Shell (cpan)

For example to install the Perl-module Monitoring::Plugin directly from CPAN using the cpan-shell you would first start the cpan-shell:

$ cpan

or:

$ sudo cpan

and then enter:

cpan> install Monitoring::Plugin

If you have troubles installing with the cpan-shell consider to check the following:

  • The cpan-shell itself must have been installed.

  • The cpan-shell’s install needs gcc and make to be installed.

  • Check the urllist:

    cpan> o conf urllist
       urllist
          0 [http://cpan.inode.at/]
              1 [http://ftp.tudelft.nl/cpan/]
              2 [http://cpan.cardse.net/]
    

Hints

On some Linux distributions core modules have been removed by the vendor - so that you have to reinstall them. The following are known issues:

CentOS release 6.8 does not include parent.pm. If that happens to you, a yum install perl-parent should help.

CentOS release 7 does not include Archive::Tar (yum install perl-Archive-Tar.noarch).


There are modules not used by the checks but for some yet not known reason they are required on some systems:

  • IPC::Run ($ yum install perl-IPC-Run.noarch)
  • Sub::Exporter::Progressive
  • IO::Zlib.

Installation of cpanminus

If the cpanm-command is not available, you may have to install cpanminus instead. This can be accomplished with the distributions package manager. On debian-based systems e.g. the following command will install capnminus:

# apt install cpanminus