How can I install mcrypt under PHP7? Laravel needs it How can I install mcrypt under PHP7? Laravel needs it laravel laravel

How can I install mcrypt under PHP7? Laravel needs it


Had the same issue - PHP7 missing mcrypt.

This worked for me. When asked, keep local PHP configuration files.

sudo apt-get updatesudo apt-get install mcrypt php7.0-mcryptsudo apt-get upgrade

Restart FPM (or Apache or NGINX etc.) after installation.


I'm on Mac and with laravel valet I've solved with this:

brew install php70-mcrypt


Even if you enable mcrypt in php.ini, this issue may occur.Try the following steps.

sudo apt-get updatesudo apt-get install mcrypt php7.0-mcrypt

I am working in ubuntu 16.04 and the following commands also helped me.

whereis php  -shows the files with this namephp -v   -shows the php versionwhich php -shows current php version that is running on the server