How to install gearman extension on MAMP

微笑、不失礼 提交于 2019-12-11 10:58:23

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!