Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

On my Ubuntu 11.04 development machine I have PHP installed (via aptitude).

I want to experiment with the libevent PHP extension but I can't seem to get it working:

root@alix-laptop:~# pecl install libevent

Failed to download pecl/libevent within preferred state "stable", latest release is version 0.0.4, stability "beta", use "channel://pecl.php.net/libevent-0.0.4" to install
install failed

root@alix-laptop:~# pecl install channel://pecl.php.net/libevent-0.0.4

downloading libevent-0.0.4.tgz ...
Starting to download libevent-0.0.4.tgz (9,003 bytes)
.....done: 9,003 bytes
3 source files, building
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
Please provide the prefix of libevent installation [autodetect] :
building in /tmp/pear/temp/pear-build-rootcvHALO/libevent-0.0.4
running: /tmp/pear/temp/libevent/configure --with-libevent
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
checking for PHP extension directory... /usr/lib/php5/20090626+lfs
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for libevent support... yes, shared
checking for libevent headers in default path... not found
configure: error: Cannot find libevent headers
ERROR: `/tmp/pear/temp/libevent/configure --with-libevent' failed

Anyone know how to install php-libevent without having to recompile PHP?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Try installing package libevent-dev

sudo apt-get install libevent-dev
share|improve this answer
    
I had tried installing libevent-core, but this one did the trick. Thanks! –  Alix Axel May 19 '11 at 15:47
1  
Recap: sudo apt-get install libevent-dev then pecl install channel://pecl.php.net/libevent-0.0.5. –  Xeoncross Jan 7 '13 at 19:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.