Using OS X 10.11.1 (El Capitan) and PHP 5.5.29.

I would like to add the GMP extension to my PHP, but I have no clue to do so. According to the PHP manual I'm supposed compile PHP with a --with-gmp=dir option. But I don't know how to compile PHP (I doubt if I ever did it on this machine, iirc it just came with PHP by default), and I don't know what dir to use with that --with-gmp= option either.

I do have Homebrew, and I noticed a rather old old similar question however that doesn't seem to work (package no longer available).

I noticed in brew there is something called homebrew/php/php55-gmp but that suggests to something with brew tap. I have no clue what that is, and I'd rather not mess up my Homebrew config or my entire development environment (I guess that's unlikely, but I have no idea what I'm doing to my system when I mess with this tap stuff).


RocketNuts, you can simply execute:

brew install homebrew/php/php55-gmp

That's all what I did.

  • 14
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags

Related Questions