Install missing Perl modules for OTRS

I’m in Stockholm this week, training on OTRS. OTRS is packaged as an RPM for OpenSUSE and RHEL/CentOS, but the package maintainers have left a lot of basic steps for the user to run after install or upgrade. Here are commands to install all missing Perl modules for OTRS, both optional and required.

CentOS/RHEL/OpenSUSE

This is tested on CentOS 6 with OTRS RPM install and EPEL repository. This probably works on CentOS 5, RHEL, and OpenSUSE as well.

sudo yum install `/opt/otrs/bin/otrs.CheckModules.pl | grep 'Not installed' | sed 's/^ *o //;s/\.\.\..*//;s/\(.*\)/"perl\(\1\)"/' | tr '\n' ' '`

Other Linux Distributions

On other Linux distributions without yum, use CPAN. This should work on Debian, Ubuntu, or other systems with an OTRS source install.

sudo cpan `/opt/otrs/bin/otrs.CheckModules.pl | grep 'Not installed' | sed 's/^ *o //;s/\.\.\..*//' | tr '\n' ' '`

How it works

otrs.CheckModules.pl outputs a list of all required or optional Perl modules:

[root@otrs otrs]# /opt/otrs/bin/otrs.CheckModules.pl
  o CGI..............................ok (v3.63)
  o Crypt::Eksblowfish::Bcrypt.......Not installed! (optional - For strong password hashing)
  o Crypt::PasswdMD5.................ok (v1.3)
...
  o YAML::XS.........................Not installed! (required - use "perl -MCPAN -e shell;" - )

We take that output, search for “Not installed”, and then use sed to manipulate it into a list of arguments to the installer:

yum install "perl(Crypt::Eksblowfish::Bcrypt)" "perl(YAML::XS)"
cpan Crypt::Eksblowfish::Bcrypt YAML::XS

Tags: , ,

  1. enrique’s avatar

    very good
    tanks !!!

    Reply

  2. Maddy’s avatar

    Hi Team ,

    I could not able to install the below modules on RHEL 6 using CPAN or YUM .
    PLease kindly help me ~~~~

    CPAN: Module::Build loaded ok (v0.421)
    Configuring L/LD/LDS/GD-2.56.tar.gz with Build.PL
    **UNRECOVERABLE ERROR**
    Could not find gdlib-config in the search path. Please install libgd 2.0.28 or higher.
    Warning: No success on command[/usr/bin/perl Build.PL –installdirs site]
    LDS/GD-2.56.tar.gz
    /usr/bin/perl Build.PL –installdirs site — NOT OK

    Reply

  3. Maddy’s avatar

    o DBD::Oracle………………….Not installed! (optional – Required to connect to a Oracle database.)
    o GD………………………….Not installed! (optional – Required for stats.)
    o GD::Text…………………..FAILED! Not all prerequisites for this module correctly installed.
    o GD::Graph………………….FAILED! Not all prerequisites for this module correctly installed.

    Reply

  4. JOE failed to do it’s avatar

    yum install `/opt/otrs/bin/otrs.CheckModules.pl | grep ‘Not installed’ | sed ‘s/^ *o //;s/\.\.\..*//;s/\(.*\)/”perl\(\1\)”/’ | tr ‘\n’ ‘ ‘`
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: centos.mirror.nac.net
    * extras: mirror.nexcess.net
    * updates: centos.mirror.constant.com
    No package “perl(Crypt::Eksblowfish::Bcrypt)” available.
    No package “perl(DBD::ODBC)” available.
    No package “perl(DBD::Oracle)” available.
    No package “perl(Encode::HanExtra)” available.
    No package “perl(JSON::XS)” available.
    No package “perl(Mail::IMAPClient)” available.
    No package “perl(ModPerl::Util)” available.
    No package “perl(Text::CSV_XS)” available.
    No package “perl(YAML::XS)” available.
    Error: Nothing to do

    Reply

Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.