0

I want in install pecl event using

pecl install event

I have followed this so far, http://www.lullabot.com/blog/article/installing-php-pear-and-pecl-extensions-mamp-mac-os-x-107-lion, with limited success.

I get the following error

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

This looks like it requires pecl libevent

So I have now run

pecl install libevent-beta

This results in the following error

configure: error: Cannot find libevent headers ERROR:

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

I know it 'could' work because pecl install uploadprogress was successful.

How can I install pecl event?

It might be worth stating my final goal is getting Socket.IO to work (https://github.com/RickySu/phpsocket.io)

Jake N
  • 10,535
  • 11
  • 66
  • 112

1 Answers1

0

pecl-event's configuration tries to find libevent headers in /usr/local /usr /opt /opt/local. I'm not an OS X user, but I guess it should install stuff into /opt/local.

This looks like it requires pecl libevent

Nope! It doesn't require PECL's libevent! You have to install libevent itself. Hmm, I guess:

port install libevent

or maybe

port install libevent-dev

You should figure it out. Anyhow, to build pecl-event you need libevent's binaries and headers. Those should be provided by packages like "libevent", "libevent-dev" or similar.

Alternatively, you can install libevent from source. Be sure to check if it's going to install into some "popular" location like /usr, /usr/local etc. By means of --with-event-libevent-dir configure option one can provide path to libevent's installation directory.

Btw, I'm a maintainer of pecl-event. Feel free to report issues.

Ruslan Osmanov
  • 20,486
  • 7
  • 46
  • 60