brew update; # updates local brew meta data
# removes old homebrew php TAP, now php is in homebrew core
brew untap homebrew/php;
brew uninstall php; # or brew uninstall php72 if you had that before
brew upgrade; # make sure all the other libs are up to date
brew cleanup; # cleanup old files
brew prune; # cleanup old symlinks
brew install autoconf; # Required by pecl
brew install php;
pecl install redis;

原因:因 homebrew/php 已在 1.5 版本并入 homebrew/core,所以须先移除旧版,安装新版后,再用 pecl 安装扩展,具体作法如下,我已经操作过没碰到问题


文章标签:PHP, PHP72, php-redis, php拓展