I have began installing pecl
on MAMP. I have added the correct php version to the path and when which php
it says /Applications/MAMP/... which is correct.
I have downloaded the Server Components and libraries
moved them to a new folder in my php and run the ./configure
everything seems to run ok and looked through all the checks being performed while installing and unpacking.
It gets to the last line and says;
configure: error: Please specify the install prefix of iconv with --with-iconv=<DIR>
Where should I set the <DIR>
for the iconv?
Just make another folder and point it at that?
I am only trying to get the mongo pecl installed.
The information I have followed is here http://www.lullabot.com/blog/article/installing-php-pear-and-pecl-extensions-mamp-mac-os-x-107-lion
PECL modules are C extensions (programs) that can be compiled into PHP. To determine if a particular PECL module is installed and enabled, you will want to create a phpinfo page and check for the specific PECL module you are looking to use in your PHP code.
pear is a php classes written in php Whereas pecl is extensions which not written in php and need compiling .
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With