问题
Has anyone ever tried and succeeded to install gearman extension on MAMP? I am trying to do it on MAMP 2.x on a MAC OS X 10.6.8
回答1:
You can install the server with homebrew
brew install gearman
Then download the PECL package here http://pecl.php.net/package/gearman and compile it
tar xzf gearman-X.Y.tgz
cd gearman-X.Y
phpize
./configure
make
sudo make install
Then copy/paste the gearman.so from your default extensions folder (for me /usr/lib/php/extensions/) to your MAMP extensions folder (eg. /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-xxxxx/)
Finally add
extension="gearman.so"
to your MAMP php.ini (/Applications/MAMP/bin/php/php5.3.6/conf/php.ini)
Restart apache and you're done
回答2:
I finally made it!
Here is how: I had to install "libevent" first, then to install "libgearman", and finally the extension
I I moved the gearman.so to the extensions directory of MAMP and then I added the extension in the php.ini
来源:https://stackoverflow.com/questions/9705925/how-to-install-gearman-extension-on-mamp