Resolve mcrypt and intl module errors installing Magento 2 with Composer on Mac

Installing Magento 2 on Mac El Capitan OS X 10.11 using Composer you could get errors like:

The requested PHP extension mcrypt is missing from your system

The requested PHP extension intl is missing from your system

PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20121212/mcrypt.so

PHP Warning: PHP Startup: mcrypt: Unable to initialize module

Resolve mcrypt module error

Make you a gift and install Homebrew (unless you like to follow biblical guide) and enter in your terminal:

$ brew install homebrew/php/php55-mcrypt

if you’re on PHP 5.5.x, or this:

$ brew install php56-mcrypt

if you’re on PHP 5.6.x

That’s it. Just to be sure, you could check that the mcrypt module is enabled in your PHP CLI mode: enter

$ php -i "(command-line 'phpinfo()')"

then Cmd + F and search “mcrypt” for lines like these:

mcrypt

mcrypt support => enabled
mcrypt_filter support => enabled

 

Resolve intl module error

Now you learned the game, install intl module with Homebrew:

$ brew install php55-intl

if you’re on PHP 5.5.x, or this:

$ brew install php56-intl

if you’re on PHP 5.6.x

And again, search “intl” for lines like these:

intl

Internationalization support => enabled

 

Now, running composer install you should not have errors anymore.

References

http://stackoverflow.com/a/32414135
https://lodge.statamic.com/questions/1342-you-must-have-the-mcrypt-php-extension-i
http://stackoverflow.com/a/30380721/1252920
http://stackoverflow.com/a/30387708/1252920

Categories

Category BootstrapCategory CoffeescriptCategory DrupalCategory GravCategory HTMLCategory JavascriptCategory JoomlaCategory jQueryCategory LaravelCategory MagentoCategory PHPCategory SharePointCategory SpringCategory ThymeleafCategory WordPressCategory Workflow

Comments

Developed and designed by Netgloo
© 2019 Netgloo