Skip to Content

PHP extension ’mcrypt’ is required.

Installing php-mcrypt on a 64-bit CentOS Ezeelogin SSH Gateway Server


Synopsis: php-mcrypt is a PHP extension that provides encryption and decryption functions using the MCrypt library. PHP allows developers to encrypt and decrypt data using various encryption algorithms supported by MCrypt

This article explains the error encountered during the installation of Ezeelogin due to a missing module.


Follow the below steps to install in different versions of CentOS and Ubuntu.

  • CentOS 5.x (Deprecated)

:~# wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

:~# rpm -ivh epel-release-5-4.noarch.rpm

:~# yum install php-mcrypt

  • CentOS 6.x (Deprecated)

:~# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

:~# rpm -ivh epel-release-6-8.noarch.rpm

:~# yum install php-mcrypt

  • CentOS 7.x

Install EPEL & php-mcrypt

:~# yum -y install epel-release

:~# yum -y install php-mcrypt

Follow the below steps if the above (EPEL) does not work in CentOS 7.x

curl -o /tmp/epel-release-x.noarch.rpm http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

:~# rpm -Uvh /tmp/epel-release-x.noarch.rpm

:~# yum -y update; yum -y install php-mcrypt*; service httpd restart


  • Ubuntu 14.x  ( Replace PHP version with yours that has been installed in your server.)

:~# apt update && apt-get install php7.5-mcrypt && phpenmod mcrypt && systemctl restart apache2

  • Ubuntu 16.x 

:~# apt update && apt-get install php7-mcrypt &&  phpenmod mcrypt && systemctl restart apache2

  • Ubuntu 22.04

:~# apt update && apt install php7.4-mcrypt -y && phpenmod mcrypt && systemctl restart apache2


Related Articles:

Switch PHP versions

Compile and install mcrypt