php7安装event拓展
下载最新版本libevent
http://libevent.org/
wget -c https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
安装libevent
./configure --prefix=/usr/local/libevent
make && make install
下载event拓展源码包
wget -c http://pecl.php.net/get/event-2.3.0.tgz
cd event-2.3.0
phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-event-libevent-dir=/usr/local/libevent/
make && make install
echo extension=event.so > /usr/local/php/conf.d/event.ini
php -m
mac上配置有所不同
1. brew install libevent
2. brew install openssl
3.
3.1 wget -c http://pecl.php.net/get/event-2.3.0.tgz
3.2 cd event-2.3.0
3.3 phpize
# configure指定依赖包路径
3.4 ./configure --with-php-config=/usr/local/Cellar/php@7.1/7.1.29/bin/php-config --with-event-libevent-dir=/usr/local/Cellar/libevent/2.1.8/ --with-openssl-dir=/usr/local/Cellar/openssl/1.0.2r/

浙公网安备 33010602011771号