Install PECL on MAMP

I started installing pecl on MAMP. I added the correct php version to the path, and when which php it says / Applications / MAMP / ... which is correct.

I downloaded Server Components and libraries , moved them to a new folder in my php and ran ./configure , everything seems to be working fine and looked at all the checks performed during installation and unpacking.

He goes to the last line and says:

 configure: error: Please specify the install prefix of iconv with --with-iconv=<DIR> 

Where should I install <DIR> for iconv?

Just create another folder and point to it?

I am only trying to install mongo pecl.

The following information is here http://www.lullabot.com/blog/article/installing-php-pear-and-pecl-extensions-mamp-mac-os-x-107-lion

+6
source share
3 answers

While working on this right now, I found a workaround to simply disable iconv with ./configure --without-iconv , which is not the best solution, but works for me.

Edit: Loaded package libiconv-1.14 and after launch. / configure, make, make install, PHP configure is working fine.

+5
source

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

You do not have to do this.

Just run for example:

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

Assume the full path to the pecl your MAMP installation.
You may need to replace /php7.1.1/ with your current and active version of PHP for MAMP.

+4
source

This did it for me:

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

First you had to install libxml2 and libxslt via homebrew:

 $ brew install libxml2 $ brew install libxslt 
+1
source

Source: https://habr.com/ru/post/956599/


All Articles