How can I install mcrypt under PHP7? Laravel needs it

Bishal Paudel picture Bishal Paudel · Dec 4, 2015 · Viewed 58.2k times · Source

Since Laravel4 requires mcrypt extension, and PHP7 doesn't seem to have mcrypt extension, is there any workaround for this to work?

Answer

Ryderpro picture Ryderpro · Feb 16, 2016

Had the same issue - PHP7 missing mcrypt.

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

sudo apt-get update
sudo apt-get install mcrypt php7.0-mcrypt
sudo apt-get upgrade

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