Problems installing PHP libevent PECL Package

10,725

Try installing package libevent-dev

sudo apt-get install libevent-dev
Share:
10,725

Related videos on Youtube

dathor
Author by

dathor

If you need to, you can contact me at: alix [dot] axel [at] gmail [dot] com. I'm #SOreadytohelp Some of my GitHub repositories: phunction, a minimalistic PHP HMVC Framework. halBox, bash script to bootstrap Debian/Ubuntu servers. ArrestDB, RESTful API for SQLite, MySQL and PostgreSQL databases. genex.js, Genex module for Node.js. If you know how to work with regexes, have a look at http://namegrep.com/. ;)

Updated on September 18, 2022

Comments

  • dathor
    dathor over 1 year

    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?

  • dathor
    dathor almost 13 years
    I had tried installing libevent-core, but this one did the trick. Thanks!
  • Xeoncross
    Xeoncross over 11 years
    Recap: sudo apt-get install libevent-dev then pecl install channel://pecl.php.net/libevent-0.0.5.