0%

Homebrew安装php5.5

因为ice扩展无法安装所以被迫从5.6降级到5.5
brew remove php56
卸载完成之后报错

$ brew install php56
Error: Formulae found in multiple taps:

  • homebrew/php/php56
  • josegonzalez/php/php56

Please use the fully-qualified name e.g. homebrew/php/php56 to refer the formula.
解决方法:untap 安装扩展
$ brew untap josegonzalez/homebrew-php
Untapping josegonzalez/php… (609 files, 2.9M)
安装5.5 输入brew install php55
提示使用 brew install homebrew/php/php55-amqp

$ brew install homebrew/php/php55-amqp
安装完成

To finish installing amqp for PHP 5.5:

  • /usr/local/etc/php/5.5/conf.d/ext-amqp.ini was created,
    do not forget to remove it upon extension removal.
  • Validate installation via one of the following methods:
  • Using PHP from a webserver:
    • Restart your webserver.
    • Write a PHP page that calls “phpinfo();”
    • Load it in a browser and look for the info on the amqp module.
    • If you see it, you have been successful!
  • Using PHP from the command line:
    • Run “php -i” (command-line “phpinfo()”)
    • Look for the info on the amqp module.
    • If you see it, you have been successful!
      ==> Summary
      🍺 /usr/local/Cellar/php55-amqp/1.6.0beta3: 3 files, 120K, built in 43 seconds
      停止php:

$ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.php55.plist
启动php:

$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php55.plist
如需安装其他扩展:

$ brew install php55-apcu
php55-gearman
php55-geoip
php55-gmagick
php55-imagick
php55-intl
php55-mcrypt
php55-memcache
php55-memcached
php55-mongo
php55-opcache
php55-pdo-pgsql
php55-phalcon
php55-redis
php55-sphinx
php55-swoole
php55-uuid
php55-xdebug;

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!