I am currently trying to setup a existing Magento site on my localhost, after cloning the repository I’m unable to run composer install. I get the following error:
Problem 1
- Installation request for magento/framework 101.0.4 -> satisfiable by magento/framework[101.0.4].
- magento/framework 101.0.4 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
Problem 2
- Installation request for magento/magento2-base 2.2.4 -> satisfiable by magento/magento2-base[2.2.4].
- magento/magento2-base 2.2.4 requires ext-intl * -> the requested PHP extension intl is missing from your system.
Problem 3
- Installation request for magento/product-community-edition 2.2.4 -> satisfiable by magento/product-community-edition[2.2.4].
- magento/product-community-edition 2.2.4 requires ext-intl * -> the requested PHP extension intl is missing from your system.
So it seems some PHP extensions are missing, however when trying to install them through brew, the following errors happen:
Error: No available formula with the name "php71-mcrypt"
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
==> Searching local taps...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
Also if I use brew list it shows mcrypt already installed, however uninstalling that didn’t help. I’ve also tried to completely re-install brew which also didn’t help.
I’m pretty inexperienced with both Magento and Brew, so if I’m missing any information here please let me know.
2
Answers
Which PHP version are you using on brew? (php -v)
I had similar when, even though brew services showed 7.1 running I was actually defaulting to 7.0.
Enter the following commands in the order shown:
You can replace 7.0 by 7.1 in the command above to get version 7.1 of PHP
If the output of
php -v
still doesn’t echoes the version 7, simply type this command to update your path, it should do the magic, as stated onphp-osx.liip.ch
website.or
or