WARNING: Module mcrypt ini file doesn't exist under /etc/php/7.2/mods-available
Solution 1
Just try and run this code and your error should be gone.
sudo ln -s /etc/php/7.1/mods-available/mcrypt.ini /etc/php/7.2/mods-available/
You should have the mcrypt.ini
file inside mods-available
and if you don't have this file there you will get this error.
NOTE: If you do it this way you will not get this error anymore, but you will get other error:
PHP Warning: PHP Startup: Unable to load dynamic library 'mcrypt.so' (tried: /usr/lib/php/20170718/mcrypt.so (/usr/lib/php/20170718/mcrypt.so: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/mcrypt.so.so (/usr/lib/php/20170718/mcrypt.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
So, based on my research mcrypt
is not supported in php7.2, so you don't have to execute sudo phpenmod mcrypt
at all. Maybe I am wrong, but if someone have more information, let me know.
Solution 2
First install php7.1. Then copy mcrpyt.ini.
sudo apt-add-repository ppa:ondrej/php
sudo apt-get install php7.1-mbstring
sudo apt-get install php7.1-mcrypt
sudo ln -s /etc/php/7.1/mods-available/mcrypt.ini /etc/php/7.2/mods-available/
sudo phpenmod mcrypt
sudo service php7.2-fpm restart
Related videos on Youtube
Comments
-
Fil over 1 year
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
WARNING: Module mcrypt ini file doesn't exist under /etc/php/7.2/mods-availableI am doing this on ubuntu installed in godaddy
Can you give best solution for this?
-
theBuzzyCoder over 5 years
-