I face below issue when trying to run composer install
:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php70/7.0.14_7/lib/php/extensions/no-debug-non-zts-20151012/php_intl.dll' - dlopen(/usr/local/Cellar/php70/7.0.14_7/lib/php/extensions/no-debug-non-zts-20151012/php_intl.dll, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php70/7.0.14_7/lib/php/extensions/no-debug-non-zts-20151012/php_intl.dll' - dlopen(/usr/local/Cellar/php70/7.0.14_7/lib/php/extensions/no-debug-non-zts-20151012/php_intl.dll, 9): image not found in Unknown on line 0 Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them. Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for magento/magento2-base 2.1.1 -> satisfiable by magento/magento2-base[2.1.1].
- magento/magento2-base 2.1.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
Problem 2
- Installation request for magento/product-community-edition 2.1.1 -> satisfiable by magento/product-community-edition[2.1.1].
- magento/product-community-edition 2.1.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
To enable extensions, verify that they are enabled in those .ini files: - /usr/local/etc/php/7.0/php.ini - /usr/local/etc/php/7.0/conf.d/ext-mcrypt.ini
You can also run
php --ini
inside terminal to see which files are used by PHP in CLI mode.
How can I fix this?
Issue
I don't have the slightest clue, how you managed to end up with a Windows DLL on Mac, but...
/usr/local/Cellar/php70/7.0.14_7/lib/php/extensions/
indicates that you are using Mac/Homebrew.no-debug-non-zts-20151012/php_intl.dll
indicates that you are trying to load a Windows DLLThe extension you are trying to use is build/compiled for another operating system. PHP can't load that file. That's the reason for the Warning: PHP Startup: Unable to load dynamic library
.
Solution
Install via Homebrew
brew update
brew install icu4c
or Install via PECL
sudo pecl update-channels
sudo pecl install intl
Then add extension=php_intl.so
to your php.ini
,
Or that full path mess: extension=/usr/local/Cellar/php70/7.0.14_7/lib/php/extensions/no-debug-non-zts-20151012/php_intl.so