最近在学习Redis在PHP环境中的使用,安装redis的php扩展时,执行 phpize 提示错误,如下图所示:
解决办法如下,打开终端,执行如下操作过程:
第一步:如果安装过Homebrew,可直接跳到第二步;如果没有安装过Homebrew,执行以下命令,先完成安装:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
第二步:安装 autoconf:
brew install autoconf
安装成功,再次执行/usr/local/php5/bin/phpize ,一切正常,如下图所示。