6

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

4

3 回答 3

7

等等等等等等。为什么要重建 PHP 安装来安装 MongoDB 驱动程序?

你不必那样做。

只需运行例如:

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

假设这是peclMAMP 安装命令部分的完整路径。
您可能需要替换/php7.1.1/为当前和活动的 MAMP php 版本。

于 2013-11-19T21:52:17.707 回答
5

现在正在处理这个问题,并找到了一个解决方法来禁用 iconv,./configure --without-iconv当然这不是最好的解决方案,但对我有用。

编辑:下载 libiconv-1.14 包,运行 ./configure 、make、make install 后,PHP 配置运行良好。

于 2013-11-11T22:48:55.317 回答
1

这为我做到了:

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

首先需要通过自制软件安装 libxml2 和 libxslt:

$ brew install libxml2
$ brew install libxslt
于 2013-11-20T23:40:24.093 回答