本文实例讲述了centos7安装swoole扩展操作。分享给大家供大家参考,具体如下:
[root@localhost html]# yum update安装需要支持的扩展
[root@localhost html]# yum install php72w-devel[root@localhost html]# yum install php72w-pear[root@localhost html]# yum install gcc[root@localhost html]# yum install gcc-c++[root@localhost html]# yum install gcc-g77安装swoole
[root@localhost html]# pecl install swoole...// 是否启用 php sockets 支持enable sockets supports? [no] : yes// 是否启用 openssl 支持enable openssl support? [no] : yes// 是否启用 http2 支持enable http2 support? [no] 优美的英文句子: yes// 是否启用 mysql 原生支持enable mysqlnd support? [no] : yes
安装成功
build process completed successfullyins笔记本电脑功率多少talling '/usr/lib64/php/modules/swoole.so'installing '/usr/include/php/ext/swoole/config.h'install ok: channel://pecl.php.net/swoole-4.4.12configuration option "php_ini" is not t to php.ini locationyou should add "extension=swoole.so" to php.ini
安装失败
php startup: unable to load dynamic library 'swoole.so' (tried: /usr/lib64/php/modules/swoole.so (/usr/lib64/php/modules/swoole.so: cannot open shared object file: no such file or directory), /usr/lib64/php/modules/swoole.so.so (/usr/lib64/ph英语家庭教育p/modules/swoole.so.so: cannot open shared object file: no such file or directory)) in unknown on line 0// 把extension=swoole.so加到socket的加载后面,在php7.2中进入/etc/php.d下,在sockets.ini中将extension=swoole.so加到extension=sockets.so下面,后重启php-fpm
php -m或者 phpinfo()查看不到swoole
解决方法:
1. 确认安装和配置是否有问题
2、如果使用php -m无法查看swoole,请使用命令rvice php-fpm restart重启
3、如果使用phpinfo()无法查看swoole,请使用命令rvice httpd restart重启
c++ preprocessor “/lib/cpp” fails sanity check// 没有c++库// yum install glibc-headers// yum install gcc gcc-c++ gcc-g77
fatal error: openssl/ssl.h: no such file or directory// 没有openssl/ssl此类文件或目录// yum install openssl-devel
error “enable http2 support, require nghttp2 library.// wget /d/file/titlepic/nghttp2-1.34.0.tar.bz2 tar -xjf nghttp2-1.34.0.tar.bz2
php warning: module 'swoole' already loaded in unknown on line 0// 在修改配置时extension=swoole.so别放在最后,最好放在extension=sockets.so后面修改配置
[root@localhost html]# vim /etc/php.ini...extension=swoole.so....重启
[root@localhost html]# /bin/systemctl restart php-fpm.rvice[root@localhost html]# /b名言in/systemctl restart httpd.rvice验证是否安装成功
php -m 或者 phpinfo() 查看是否有swoole
[root@localhost /]# php --ri swoole
希望本文所述对大家c遥远的重逢entos系统配置有所帮助。
本文发布于:2023-04-08 19:32:19,感谢您对本站的认可!
本文链接:https://www.wtabcd.cn/fanwen/zuowen/58efdb8ac18654f2d4511b38b96ab964.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文word下载地址:Centos7安装swoole扩展操作示例.doc
本文 PDF 下载地址:Centos7安装swoole扩展操作示例.pdf
留言与评论(共有 0 条评论) |