How can I install mcrypt under PHP7? Laravel needs it

laravel, laravel-4, mcrypt, php, php-7

Solution

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.

Problem

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

Original source