首页 > Web开发 > 详细

PHP安装libevent扩展

时间:2014-07-16 21:00:53      阅读:375      评论:0      收藏:0      [点我收藏+]
1.  下载扩展

官方地址http://pecl.php.net/package/libevent

请根据自己的PHP脚本选择相应版本

wget  http://pecl.php.net/get/libevent-0.0.4.tgz

2.  

下载 wget http://pecl.php.net/get/libevent-0.0.4.tgz

解压 tar -zxvf libevent-0.0.4.tgz

cd libevent-0.0.4

phpize

./configure --with-php-config=/local/php/bin/php-config

发现报错 

显示为re2c版本过低  从http://www.re2c.org/ 下载   安装之

继续

./configure --with-php-config=/local/php/bin/php-config

报错  Cannot find libevent headers  需要安装libevent

下载 libevent 官网 http://libevent.org/ 

wget  https://github.com/downloads/libevent/libevent/libevent-2.0.20-stable.tar.gz

tar -zxvf libevent-2.0.20-stable.tar.gz 

cd libevent-2.0.20-stable

./configure --prefix=/local/libevent-2.0.20-stable/

make && make install

再次安装扩展,加入 --with-libevent
./configure --with-php-config=/home/users/suqian/.jumbo/php/bin/php-config --with-libevent=/local/libevent-2.0.20-stable/

make && make install

之后配置 php.ini 移动 生成的 .so 文件到 php.ini 中配置的 extensions_dir下
并添加配置

extension="libevent.so"

 

PHP安装libevent扩展,布布扣,bubuko.com

PHP安装libevent扩展

原文:http://www.cnblogs.com/sailrancho/p/3835940.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!