Mcrypt installation process

Install epel-release repo if you do not already have it installed

# yum install epel-release

Install libmycrpt and libmcrypt-devel rpms needed for the PHP extensions.

# yum install libmcrypt libmcrypt-devel

Update all Pecl php versions.

# for version in $(ls /opt/cpanel|grep ea-php); do /opt/cpanel/${version}/root/usr/bin/pecl channel-update pecl.php.net; done

Install Mcrypt PHP extensions via Pecl for PHP72 and PHP73

# /opt/cpanel/ea-php72/root/usr/bin/pecl install channel://pecl.php.net/mcrypt-1.0.1
# /opt/cpanel/ea-php73/root/usr/bin/pecl install channel://pecl.php.net/mcrypt-1.0.2

If it installs successfully it should look something like this at the end of each step.

Build process completed successfully
Installing '/opt/cpanel/ea-php72/root/usr/lib64/php/modules/mcrypt.so'
install ok: channel://pecl.php.net/mcrypt-1.0.1
Extension mcrypt enabled in php.ini
Build process completed successfully
Installing '/opt/cpanel/ea-php73/root/usr/lib64/php/modules/mcrypt.so'
install ok: channel://pecl.php.net/mcrypt-1.0.2
Extension mcrypt enabled in php.ini

Restart Apache/Litespeed to make the new PHP extensions active.

# service httpd restart

By anup