Mcrypt PHP extension required on Mac OS X Mcrypt PHP extension required on Mac OS X laravel laravel

Mcrypt PHP extension required on Mac OS X


Steps

I solved this by running the following commands

brew updatebrew upgradebrew tap homebrew/dupesbrew tap josegonzalez/homebrew-phpbrew install php54-mcryptphp --version // To Test your php sudo composer update

Result

No more Mcrypt warning !!

Loading composer repositories with package informationUpdating dependencies (including require-dev)Nothing to install or updateGenerating autoload filesGenerating optimized class loader


After update brew:

brew updatebrew upgradebrew tap homebrew/dupesbrew tap josegonzalez/homebrew-php

If you have installed php5.6 (or higher), you can use the following command to find out what versions are available in brew:

$ brew search mcrypthomebrew/php/php53-mcrypt     homebrew/php/php55-mcrypt         homebrew/php/php70-mcrypt     mcrypthomebrew/php/php54-mcrypt     homebrew/php/php56-mcrypt     homebrew/php/php71-mcrypt

In my case, I am using php7.0:

$ brew install php70-mcrypt


On macOS High Sierra I did this steps:

1- Search the package:

brew search mcrypt

Result:

==> Searching local taps... homebrew/php/php71-mcrypt mcrypt homebrew/php/php53-mcrypt
homebrew/php/php54-mcrypt homebrew/php/php55-mcrypt homebrew/php/php56-mcrypt homebrew/php/php70-mcrypt libtomcrypt

2- Search my php version to know what can I need to install:

php --version

Result:

PHP 7.1.7 (cli) (built: Jul 15 2017 18:08:09) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

3- Install the correct package, for me was 7.1.7 => homebrew/php/php71-mcrypt

brew install homebrew/php/php71-mcrypt

4- Find the find "mcrypt.so" extension file

find /usr/ -type f -name "mcrypt.so"

Result:

find: /usr//local/Cellar/php71-mcrypt/7.1.13_19/mcrypt.so

5- Search the php.ini

php -i | grep 'Configuration File'

Result (if exist):

Configuration File (php.ini) Path => /etc Loaded Configuration File => /etc/php.ini

6- Add the next line at the end on /etc/php.ini (see the last step your correct path) the extension mcrypt.so

 extension=/usr/local/Cellar/php71-mcrypt/7.1.13_19/mcrypt.so

Finish, you can now execute your command.