大型门户网站建设多少钱网站seo排名免费咨询
大型门户网站建设多少钱,网站seo排名免费咨询,大企业网站建设公司,做产品的淘宝客网站因为使用的GatewayWorker框架使用了swoole#xff0c;但swoole依赖于event#xff0c;所以必须安装下event扩展#xff01; 1. 最初使用brew install libevent安装了下#xff0c;运行gatewayworker发现错误依然存在#xff01;
2. 考虑到是php里使用event#xff0c;所…因为使用的GatewayWorker框架使用了swoole但swoole依赖于event所以必须安装下event扩展 1. 最初使用brew install libevent安装了下运行gatewayworker发现错误依然存在
2. 考虑到是php里使用event所以改用pecl去安装先用pecl search event搜索了下结果如下
[zcm7.2 47]$pecl search event
Retrieving data...0%
.Matched packages, channel pecl.php.net:Package Stable/(Latest) Local
event 2.4.1 (stable) Provides interface to libevent library
libevent 0.1.0 (beta) Libevent - event notification
但是用pecl install libevent时发现因为这个版本是beta版本所以下载失败。。。。
改用pecl install event安装过程中因为无法找到openssl的库路径而安装失败因此改用先下载安装包再自行解压安装
3. pecl download event
tar -zxvf event-2.4.1.tgz
cd event event-2.4.1
phpize
./configure --with-php-config/usr/local/opt/php/bin/php-config --enable-event-debugyes --enable-event-socketsyes --with-event-libevent-dir/usr --with-event-pthreads --with-event-extra --with-event-openssl --with-event-ns --with-openssl-dir/usr/local/Cellar/openssl/1.0.2o_1
make
make install
编译并安装完成
4. 配置
mvim /usr/local/etc/php/7.2/php.ini
添加: extensionevent.so
保存并退出
5. 测试
php -m | grep event
如果有event就说明对了 同样, 安装php的swoole扩展时如果启用openssl, 可能也会遇到同样的问题, 在一系列的折腾后, 在以下目录发现有用的脚本文件:
[zcmswoole-4.3.5 14]$pwd
/Users/zcm/Downloads/swoole-4.3.5
[zcmswoole-4.3.5 15]$cat make.sh
phpize --clean
phpize
./configure --enable-openssl --enable-sockets --enable-mysqlnd --enable-http2
make clean
make -j
make install
根据我自己电脑上openssl库的路径,在./configure命令中加入了以下参数 --with-openssl-dir/usr/local/Cellar/openssl/1.0.2s
再执行sh make.sh, 最后安装成功, 安装成功后, 记得要在php.ini文件中启用swoole扩展, 即添加: extensionswoole.so
最后在命令行中执行: php -m | grep swoole 检测是否有swoole了!
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/90508.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!