Mac下编译安装PHP7时报错:configure: error: Please specify the install prefix of iconv with –with-iconv=<DIR>的解决办法

今天在Mac电脑上编译安装PHP7时报错,错误提示为:configure: error: Please specify the install prefix of iconv with –with-iconv=

根据提示安装了下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/

再次执行安装命令,成功在Mac下编译安装php-7.3.4。

未经允许不得转载:吾爱主机之家 » Mac下编译安装PHP7时报错:configure: error: Please specify the install prefix of iconv with –with-iconv=<DIR>的解决办法