Home » Php » Installing GMP on macOS High SIerra via Homebrew

Installing GMP on macOS High SIerra via Homebrew

Posted by: admin October 29, 2018 Leave a comment

Questions:

I have been trying to get this running on my machine: https://github.com/Minishlink/web-push-php-example

After creating the project and changing into the directory composer install returned this:

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.

The problems it then lists all look close to this:

the requested PHP extension gmp is missing from your system.

So I installed gmp via Homebrew.

Searching for gmp afterwards returned this:

==> Searching local taps...
gmp ✔
==> Searching taps on GitHub...
==> Searching blacklisted, migrated and deleted formulae...

But if I check the list, that is returned by php -m it is not there.

I also tried adding the extension via extension=gmp.so to the php.ini which resulted in new errors.

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

And of course I still get the same errors when trying composer install in my project directory.

Please help me out! I don’t know what to do…

Answers: