PHP extension ’mcrypt’ is required.
Installing php-mcrypt on Ezeelogin SSH gateway server
Overview: This article addresses how to resolve the error "PHP extension ’mcrypt’ is required" that occurs during the installation of Ezeelogin due to the absence of the php-mcrypt module. The mcrypt PHP extension enables encryption and decryption functions using the MCrypt library, allowing developers to securely encrypt and decrypt data using various encryption algorithms supported by MCrypt.
Follow the steps below to install the mcrypt extension on different versions of CentOS and Ubuntu.
1. CentOS 5.x (Deprecated)
root@gateway:~# wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
root@gateway:~# rpm -ivh epel-release-5-4.noarch.rpm
root@gateway:~# yum install php-mcrypt
2. CentOS 6.x (Deprecated)
root@gateway:~# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
root@gateway:~# rpm -ivh epel-release-6-8.noarch.rpm
root@gateway:~# yum install php-mcrypt
3. CentOS 7.x
Step 3(A): Install EPEL & php-mcrypt
root@gateway:~# yum -y install epel-release
root@gateway:~# yum -y install php-mcrypt
Step 3(B): If the above EPEL installation doesn't work on CentOS 7.x, follow these steps:
root@gateway:~# curl -o /tmp/epel-release-x.noarch.rpm http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
root@gateway:~# rpm -Uvh /tmp/epel-release-x.noarch.rpm
root@gateway:~# yum -y update; yum -y install php-mcrypt*; service httpd restart
4. Ubuntu 14.x ( Replace PHP version with yours that has been installed in your server.)
root@gateway:~# apt update && apt-get install php7.5-mcrypt && phpenmod mcrypt && systemctl restart apache2
5. Ubuntu 16.x
root@gateway:~# apt update && apt-get install php7-mcrypt && phpenmod mcrypt && systemctl restart apache2
6. Ubuntu 22.04
root@gateway:~# apt update && apt install php7.4-mcrypt -y && phpenmod mcrypt && systemctl restart apache2