PHP Configure Error: Please specify the install prefix of iconv with --with-iconv=<DIR>

omic picture omic · Jul 28, 2014 · Viewed 9.9k times · Source

I'm trying to configure PHP 5.5 on MAMP, following this post:

Having problems while try to install OAUTH with PECL in MAMP on mac OS lion.

After I move the downloaded PHP folders into MAMP/bin/php (I also tried to create a directory of /php5.5.14/include/php as described in the post above) and ran ./configure.

I got an error:

checking for iconv support... yes
checking for iconv... no
checking for libiconv... no
configure: error: Please specify the install prefix of iconv with --with-iconv=< DIR >

Where can I "specify the install prefix" or how can I solve this problem?

Thanks!!

Answer

Mark Fox picture Mark Fox · Nov 2, 2015

With Homebrew:

brew install libiconv

then

./configure --with-iconv=$(brew --prefix libiconv)

brew --prefix libiconv normally evaluates to /usr/local/opt/libiconv