It is recommended to copy and paste each cpanm command individually, as they may be interactive. If cpanm commands ask for options, choose the defaults.

Before installing cpan packages check that there are no PERL environment variables set. If there are, packages may be installed into root's home directory and processes may not work when started on system boot. You should remove the variables from /root/.bashrc (or wherever set them) and then logout and login to the shell to clear the variables. To check for PERL environment variables run:

  • env | grep PERL

CentOS 6 and earlier:

  • yum -y install epel-release expat-devel gcc gcc-c++ ghostscript gnutls-devel libpng-devel libtiff libtiff-devel libunistring-devel make mysql mysql-devel ncurses-devel nfs-utils ntp openssl-devel patch perl-CGI perl-Crypt-SSLeay perl-CGI perl-ExtUtils-Embed perl-Digest-SHA perl-libwww-perl perl-Socket6 psmisc subversion unzip wget zip zlib-devel
  • wget --no-check-certificate -O - http://cpanmin.us | perl - App::cpanminus
  • cpanm --force DBI DBD::mysql Crypt::JWT Date::Calc Date::Calc::XS Digest::Bcrypt Email::Sender Env::C HTML::Template JSON~2.90 JSON::XS MIME::Entity Net::IP Net::Server Protocol::WebSocket::Client Socket Storable String::LCSS Sub::Name Term::ReadKey Text::CSV Text::Levenshtein Time::HiRes XML::Simple

CentOS 7:

  • yum -y install epel-release
  • yum -y install expat-devel gcc gcc-c++ ghostscript gnutls-devel libpng-devel libtiff libtiff-devel libunistring-devel make mysql mysql-devel ncurses-devel net-tools nfs-utils ntp openssl-devel patch perl-core perl-CGI perl-CGI perl-Date-Calc perl-Digest-SHA perl-Email-Sender perl-ExtUtils-Embed perl-HTML-Template perl-libwww-perl perl-LWP-Protocol-https perl-Net-IP perl-Net-Server perl-Socket6 perl-Sub-Name perl-Sys-Syslog perl-Text-CSV perl-Time-HiRes perl-XML-Simple psmisc subversion unzip wget zip zlib-devel
  • wget --no-check-certificate -O - http://cpanmin.us | perl - App::cpanminus
  • cpanm --force DBI DBD::mysql Crypt::JWT Date::Calc::XS Digest::Bcrypt Env::C JSON~2.90 JSON::XS MIME::Entity Protocol::WebSocket::Client String::LCSS Term::ReadKey Text::Levenshtein Sub::Util Class::Load::XS

CentOS 8 and later:

  • dnf config-manager --set-enabled powertools
  • [If the above fails, try dnf config-manager --set-enabled crb instead]
  • dnf install -y epel-release
  • dnf install -y chrony expat-devel gcc gcc-c++ ghostscript gnutls-devel libpng-devel libtiff libtiff-devel libunistring-devel make mysql mysql-devel ncurses-devel net-tools nfs-utils openssl-devel patch perl-core perl-CGI perl-CGI perl-Date-Calc perl-Digest-SHA perl-Email-Sender perl-ExtUtils-Embed perl-HTML-Template perl-libwww-perl perl-LWP-Protocol-https perl-Net-IP perl-Net-Server perl-Socket6 perl-Sys-Syslog perl-Time-HiRes perl-XML-Simple psmisc subversion tar unzip wget zip zlib-devel
  • wget --no-check-certificate -O - http://cpanmin.us | perl - App::cpanminus
  • cpanm --force DBI DBD::mysql Crypt::JWT Date::Calc::XS Digest::Bcrypt Env::C JSON~2.90 JSON::XS MIME::Entity Protocol::WebSocket::Client String::LCSS Sub::Name Term::ReadKey Text::CSV Text::Levenshtein Sub::Util Class::Load::XS

Debian / Devuan:

  • apt-get install default-libmysqlclient-dev
  • [If the above fails, try apt-get install libmysqlclient-dev instead]
  • apt-get install mysql-client
  • [If the above fails, try apt-get install mariadb-client instead]
  • apt-get install ntp
  • [If the above fails, try apt-get install chrony instead]
  • apt-get install cpanminus gcc g++ ghostscript libc6-dev libcrypt-ssleay-perl libdate-calc-perl libdate-calc-xs-perl libdigest-sha-perl libgnutls28-dev libhtml-template-perl libncurses-dev libnet-ip-perl libnet-server-perl libsocket6-perl libssl-dev libsub-name-perl libterm-readkey-perl libtext-csv-perl libtext-levenshtein-perl libtext-levenshteinxs-perl libtiff5 libtiff5-dev libtiff-tools libunistring-dev libwww-perl libxml-simple-perl make ncftp net-tools nfs-common ngrep psmisc subversion unzip zip zlib1g-dev
  • cpanm --force DBI DBD::mysql Crypt::JWT Digest::Bcrypt Email::Sender Env::C JSON~2.90 JSON::XS MIME::Entity Protocol::WebSocket::Client String::LCSS

On Debian Stretch or Devuan Ascii do:

  • apt-get install libssl1.0-dev

On Debian Jessie and earlier do:

  • apt-get install libpng-dev

Fedora 21 and earlier:

  • yum -y install gcc gcc-c++ ghostscript gnutls-devel libpng-devel libtiff libtiff-devel make mysql-devel ncftp ncurses-devel ngrep ntp openssl-devel patch perl-Crypt-SSLeay perl-Date-Calc perl-Digest-SHA perl-CGI perl-Email-Sender perl-HTML-Template perl-JSON perl-Net-Server perl-Socket6 perl-Sub-Name perl-XML-Simple perl-libwww-perl psmisc subversion wget
  • wget --no-check-certificate -O - http://cpanmin.us | perl - App::cpanminus
  • cpanm --force DBI DBD::mysql Crypt::JWT Digest::Bcrypt Env::C MIME::Entity Protocol::WebSocket::Client String::LCSS Text::Levenshtein

Fedora 22 and later:

  • yum -y install gcc gcc-c++ ghostscript gnutls-devel libpng-devel libtiff libtiff-devel make mysql-devel ncftp ncurses-devel ngrep ntp openssl-devel patch perl-Crypt-SSLeay perl-Date-Calc perl-CGI perl-Digest-SHA perl-Email-Sender perl-HTML-Template perl-JSON perl-Net-Server perl-Socket6 perl-Sub-Name perl-XML-Simple perl-libwww-perl perl-LWP-Protocol-https psmisc subversion wget
  • wget --no-check-certificate -O - http://cpanmin.us | perl - App::cpanminus
  • cpanm --force DBI DBD::mysql Crypt::JWT Digest::Bcrypt Env::C MIME::Entity Protocol::WebSocket::Client String::LCSS Text::Levenshtein

Redhat Enterprise:

  • yum -y install expat-devel gcc gcc-c++ ghostscript gnutls-devel libpng-devel libtiff libtiff-devel make mysql-devel ncurses-devel openssl-devel ntp perl-Crypt-SSLeay perl-CGI perl-Digest-SHA perl-JSON perl-libwww-perl perl-LWP-Protocol-https perl-Socket6 psmisc subversion
  • wget --no-check-certificate -O - http://cpanmin.us | perl - App::cpanminus
  • cpanm --force DBI DBD::mysql Crypt::JWT Date::Calc Date::Calc::XS Digest::Bcrypt Email::Sender Env::C HTML::Template MIME::Entity Net::IP Net::Server Protocol::WebSocket::Client String::LCSS Sub::Name Term::ReadKey Text::CSV Text::Levenshtein Time::HiRes XML::Simple

On machines running Rocky Linux:

  • dnf config-manager --set-enabled powertools
  • [If the above fails, try dnf config-manager --set-enabled crb instead]
  • dnf install -y epel-release
  • dnf install -y chrony expat-devel gcc gcc-c++ ghostscript git gnutls-devel libjpeg-devel libpng-devel libtiff libtiff-devel libunistring-devel make mysql mysql-devel ncurses-devel net-tools nfs-utils openssl-devel patch perl-core perl-CGI perl-CGI perl-Date-Calc perl-Digest-SHA perl-Email-Sender perl-ExtUtils-Embed perl-HTML-Template perl-libwww-perl perl-LWP-Protocol-https perl-Net-IP perl-Net-Server perl-Socket6 perl-Sys-Syslog perl-Time-HiRes perl-XML-Simple perl-Redis psmisc tar unzip wget zip zlib-devel
  • wget --no-check-certificate -O - http://cpanmin.us | perl - App::cpanminus
  • cpanm --force DBI DBD::mysql Crypt::JWT Date::Calc::XS Digest::Bcrypt Env::C JSON~2.90 JSON::WebToken JSON::XS MIME::Entity Protocol::WebSocket::Client String::LCSS Sub::Name Term::ReadKey Text::CSV Text::Levenshtein Sub::Util Class::Load::XS Module::Pluggable

Additional packages for Rocky 9 compatible systems:

  • dnf install -y chkconfig initscripts

Ubuntu:

  • apt-get install default-libmysqlclient-dev
  • [If the above fails, try apt-get install libmysqlclient-dev instead]
  • apt-get install ntp
  • [If the above fails, try apt-get install chrony instead]
  • apt-get install cpanminus gcc g++ ghostscript libc6-dev libcrypt-ssleay-perl libdate-calc-perl libdate-calc-xs-perl libdigest-sha-perl libemail-sender-perl libgnutls28-dev libhtml-template-perl libncurses-dev libnet-ip-perl libnet-server-perl libsocket6-perl libsub-name-perl libterm-readkey-perl libtext-csv-perl libtext-levenshtein-perl libtext-levenshteinxs-perl libtiff5-dev libtiff-tools libunistring-dev libwww-perl libxml-simple-perl make ncftp net-tools nfs-common ngrep patch psmisc subversion unzip xpdf-utils zip zlib1g-dev mysql-client libssl-dev libunistring-dev
  • cpanm --force DBI DBD::mysql Crypt::JWT Data::Dumper Digest::Bcrypt Env::C IO::Socket::INET JSON~2.90 JSON::XS LWP::UserAgent MIME::Entity String::LCSS Protocol::WebSocket::Client

On Ubuntu Zesty do:

  • apt-get install libssl1.0-dev

On all systems do:

  • mysql -V | awk -F'[ ,]+' '{print $5}'

to get the MySQL version that the server has installed. If it is version 8.x or later, do:

  • cpanm DBD::mysql@5.003

or whichever 5.x version is supported by the OS.

If it is version 5.x do:

  • cpanm DBD::mysql@4.023

or whichever 4.x version is supported by the OS.