These steps should have been mentioned in the prerequisites of the Laravel Installation Guide, since I'm surely not the only person trying to get Laravel running on macOS.
Install Mcrypt using Homebrew and PECL (comes with PHP)
# PHP 7.3
$ brew install mcrypt
$ pecl install mcrypt-1.0.3Find your php.ini:
$ php -i | grep "Loaded Configuration File"
Loaded Configuration File => /usr/local/etc/php/7.3/php.iniAdd this line to your php.ini:
extension=/usr/local/Cellar/php/7.3.x/pecl/20180731/mcrypt.soInstall Mcrypt using Homebrew
# PHP 7
$ brew install php70-mcrypt
# PHP 5
$ brew install php56-mcrypt --without-homebrew-phpAdd this line to /private/etc/php.ini:
# PHP 7
extension="/usr/local/Cellar/php70-mcrypt/7.0.x/mcrypt.so"
# PHP 5
extension="/usr/local/Cellar/php56-mcrypt/5.6.x/mcrypt.so"You are ready to go!
Upgrade Mcrypt using Homebrew
$ brew reinstall -fs php71-mcrypt
php 7.2
Pecl installation failed. I see, that my directory links was broken.
in
/usr/local/Cellar/php@7.2/7.2.15/share/php@7.2/pear/System.php:294I so that it try to create/usr/local/Cellar/php@7.2/7.2.15/pecl. In the fact it's a broken link to/usr/local/lib/php/pecl. That directory was not created. If you have something like thiis, you need to create another link, like: