解决问题:
先 mv /Applications/MAMP/Library/bin/m4 /Applications/MAMP/Library/bin/m4_backup
brew reinstall m4
echo 'export PATH="/usr/local/opt/m4/bin:$PATH"' >> ~/.zshrc
或者
echo 'export PATH="/usr/local/opt/m4/bin:$PATH"' >> ~/.bash_profile
依据自己的环境配置
进行重新编译
软连接到指定位置
ln -s /usr/local/opt/m4/bin/m4 /Applications/MAMP/Library/bin/m4
./phpize