今天在电脑上编译安装PHP7时报错:configure: error: Please specify the install prefix of iconv with --with-iconv=<DIR>

根据提示安装了下libiconv

brew install libiconv

修改安装命令,加上--with-iconv=/usr/local/opt/libiconv/

./configure --prefix=/Users/luzhifang/php/php-7.3.4/output/ --enable-fpm --enable-debug --with-iconv=/usr/local/opt/libiconv/