문제

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

도움이 되었습니까?

해결책 2

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.

다른 팁

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.

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top