WARNING: Module mcrypt ini file doesn't exist under /etc/php/7.2/mods-available

Fil picture Fil · Jan 21, 2018 · Viewed 35.2k times · Source

I've been trying to install phpmyadmin in Ubuntu 16.04.3 LTS having a lamp installed, php 7.2, mysql Ver 15.1 Distrib 10.2.12-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 and apache2.

and I am following this article from digitalOcean, but when I came to the part that I need to run sudo phpenmod mcrypt I got a message saying..

WARNING: Module mcrypt ini file doesn't exist under /etc/php/7.2/mods-available

I am doing this on ubuntu installed in godaddy

Can you give best solution for this?

Answer

Somnath Sinha picture Somnath Sinha · May 7, 2018

Pointing to php7.1-mcrypt with php7.2 will solve the issue here. Below are the steps to configure 7.1 version mcrypt with php7.2

Install php7.1-mcrypt

sudo apt install php7.1-mcrypt


Create symbolic link to php7.1-mcrypt

sudo ln -s /etc/php/7.1/mods-available/mcrypt.ini /etc/php/7.2/mods-available/


Enable mcrypt extension

sudo phpenmod mcrypt


Restart the FastCGI Process Manager service

sudo service php7.2-fpm restart


Note:
The above solution is a workaround to enable mcrypt in php7.2 through apt till php7.2-mcrypt is not available.