Installing PECL on MAMP Installing PECL on MAMP mongodb mongodb

Installing PECL on MAMP


Wait wait wait wait. Why are you rebuilding your PHP installation to install the MongoDB driver?

You don't have to do that.

Just run e.g.:

/Applications/MAMP/bin/php/php7.1.1/bin/pecl install mongo

Assuming thats the full path to the pecl command part of your MAMP installation.
You might need to replace /php7.1.1/ with your current and active MAMP php version.


Working on this right now and found a workaround to just disable iconv with ./configure --without-iconv which not the best solution of course, but works for me.

Edit: Downloaded libiconv-1.14 package, and after running ./configure , make, make install, PHP configure runs fine.


This did it for me:

$ ./configure --with-iconv=/usr/lib/

First needed to install libxml2 and libxslt via homebrew though:

$ brew install libxml2$ brew install libxslt