在我的Ubuntu 11.04开发机器上,我安装了
PHP(通过aptitude).
我想尝试libevent PHP extension,但我似乎无法让它工作:
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
尝试安装libevent-dev软件包
原文链接:https://www.f2er.com/ubuntu/348404.htmlsudo apt-get install libevent-dev