Q:

How can I install mcrypt under PHP7? Laravel needs it

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

A:

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.

A:

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

brew install php70-mcrypt

A:

Even if you enable mcrypt in php.ini, this issue may occur.
Try the following steps.
sudo apt-get update
sudo 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 name
php -v   -shows the php version
which php -shows current php version that is running on the server

