I am trying to install and enable GMP extension for PHP.
Mac OS High Sierra 10.13.5
PHP Version: 7.1.16
Composer version: 1.6.5
Homebrew version: 1.6.9
I am getting this error when I run composer install
.
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested PHP extension ext-gmp * is missing from your system. Install or enable PHP's gmp extension.
The composer.json
has dependency on "ext-gmp": "*"
. I have tried following things:
brew install homebrew/php/php70-gmp
brew install gmp
brew install homebrew/homebrew-core/php70-gmp
php.ini
to enable extension=php_gmp.dll
I'm still getting the same error on composer install. Can anyone please help me with this?
Start Again. Install PHP 7
brew install [email protected]
add php path to ~/.bash_profile
or ~/.zshrc
:
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
then source file, start php and check gmp has been loaded
brew services start [email protected]
source ~/.zshrc
php -info | grep "GMP"
Try Again