2014-01-16 102 views
0

我想用MAMP,安装PECL事件

pecl install event 

我跟了这到目前为止,http://www.lullabot.com/blog/article/installing-php-pear-and-pecl-extensions-mamp-mac-os-x-107-lion,用有限的成功安装pecl event

我收到以下错误

configure: error: Please reinstall the event library, or provide the installation prefix via --with-event-libevent-dir option

ERROR: `/private/tmp/pear/temp/event/configure --enable-event-debug=no --enable-event-sockets=yes --with-event-libevent-dir=/usr --with-event-pthreads=no --with-event-extra --with-event-openssl --with-openssl-dir=no' failed

这看起来像它需要pecl libevent

所以我现在已经运行

pecl install libevent-beta 

这将导致以下错误

configure: error: Cannot find libevent headers ERROR:

`/private/tmp/pear/temp/libevent/configure --with-libevent' failed

我知道'可以'工作,因为pecl install uploadprogress成功。

如何安装pecl event

这可能是值得说明我的最终目标是让Socket.IO工作(https://github.com/RickySu/phpsocket.io

回答

0

PECL事件的配置试图找到libevent的头在/usr/local/usr/opt/opt/local。我不是OS X用户,但我想它应该安装到/opt/local

This looks like it requires pecl libevent

没有!它不需要PECL的解救!你必须自己安装libevent。嗯,我猜:

port install libevent 

也许

port install libevent-dev 

你应该搞清楚。无论如何,要构建pecl事件,您需要libevent的二进制文件和头文件。 这些应该由“libevent”,“libevent-dev”或类似软件包提供。

或者,您可以从源代码安装libevent。一定要检查它是否要安装到一些“流行”的位置,如/usr/usr/local等。通过--with-event-libevent-dirconfigure选项可以提供路径到libevent的安装目录。

顺便说一句,我是pecl事件的维护者。请随时致电report issues