首页
下载
文档
问答社区
视频
捐赠
源代码
AI 助理
赞助商
CRMEB
Apipost
腾讯云
微擎
禅道
51Talk
商业产品
Swoole AI 智能文档翻译器
Swoole-Compiler PHP 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
ubuntu安装环境问题
### 问题描述 PHP Warning: PHP Startup: Unable to load dynamic library 'swoole.so' (tried: /usr/lib/php/20180731/swoole.so (/usr/lib/php/20180731/swoole.so: undefined symbol: curl_CURLFile_class) ### Swoole版本,PHP版本,以及操作系统版本信息 ### 相关代码 ```php 请将代码粘贴至此处(请勿用截图) ``` ### 你期待的结果是什么?实际看到的错误信息又是什么?
发布于3年前 · 8 次浏览 · 来自
提问
吧吧吧v
### 问题描述 PHP Warning: PHP Startup: Unable to load dynamic library 'swoole.so' (tried: /usr/lib/php/20180731/swoole.so (/usr/lib/php/20180731/swoole.so: undefined symbol: curl_CURLFile_class) ### Swoole版本,PHP版本,以及操作系统版本信息 ### 相关代码 ```php 请将代码粘贴至此处(请勿用截图) ``` ### 你期待的结果是什么?实际看到的错误信息又是什么?
赞
0
分享
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
评论
2021-03-16
鲁飞
请调整扩展加载顺序,先加载 curl.so 后加载 swoole.so
赞
0
回复
2021-03-16
吧吧吧v
---------------------------------------------------------------------- Libraries have been installed in: /tmp/pear/temp/pear-build-rootUgI7Zi/swoole-4.6.4/modules If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the '-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the 'LD_RUN_PATH' environment variable during linking - use the '-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to '/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- Build complete. Don't forget to run 'make test'. running: make INSTALL_ROOT="/tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4" install Installing shared extensions: /tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4/usr/lib/php/20180731/ Installing header files: /tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4/usr/include/php/20180731/ running: find "/tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4" | xargs ls -dils 1048937 4 drwxr-xr-x 3 root root 4096 Mar 16 14:01 /tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4 1049245 4 drwxr-xr-x 4 root root 4096 Mar 16 14:01 /tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4/usr 1049249 4 drwxr-xr-x 3 root root 4096 Mar 16 14:01 /tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4/usr/include 1049250 4 drwxr-xr-x 3 root root 4096 Mar 16 14:01 /tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4/usr/include/php 1049251 4 drwxr-xr-x 3 root root 4096 Mar 16 14:01 /tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4/usr/include/php/20180731 1049252 4 drwxr-xr-x 3 root root 4096 Mar 16 14:01 /tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4/usr/include/php/20180731/ext 1049253 4 drwxr-xr-x 5 root root 4096 Mar 16 14:01 /tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4/usr/include/php/20180731/ext/swoole 1049258 8 -rw-r--r-- 1 root root 5251 Mar 16 14:01 /tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4/usr/include/php/20180731/ext/swoole/config.h 1049254 4 drwxr-xr-x 2 root root 4096 Mar 16 14:01 /tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4/usr/include/php/20180731/ext/swoole/ext-src 1049255 4 drwxr-xr-x 2 root root 4096 Mar 16 14:01 /tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4/usr/include/php/20180731/ext/swoole/include 1049256 4 drwxr-xr-x 3 root root 4096 Mar 16 14:01 /tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4/usr/include/php/20180731/ext/swoole/thirdparty 1049257 4 drwxr-xr-x 2 root root 4096 Mar 16 14:01 /tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4/usr/include/php/20180731/ext/swoole/thirdparty/hiredis 1049246 4 drwxr-xr-x 3 root root 4096 Mar 16 14:01 /tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4/usr/lib 1049247 4 drwxr-xr-x 3 root root 4096 Mar 16 14:01 /tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4/usr/lib/php 1049248 4 drwxr-xr-x 2 root root 4096 Mar 16 14:01 /tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4/usr/lib/php/20180731 1049244 26708 -rwxr-xr-x 1 root root 27348024 Mar 16 14:01 /tmp/pear/temp/pear-build-rootUgI7Zi/install-swoole-4.6.4/usr/lib/php/20180731/swoole.so Build process completed successfully Installing '/usr/lib/php/20180731/swoole.so' Installing '/usr/include/php/20180731/ext/swoole/config.h' install ok: channel://pecl.php.net/swoole-4.6.4 configuration option "php_ini" is not set to php.ini location You should add "extension=swoole.so" to php.ini 开启--enable-swoole-json --enable-swoole-curl 出现问题 ubuntu18.X环境 PHP Warning: PHP Startup: Unable to load dynamic library 'swoole.so' (tried: /usr/lib/php/20180731/swoole.so (/usr/lib/php/20180731/swoole.so: undefined symbol: json_globals), /usr/lib/php/20180731/swoole.so.so (/usr/lib/php/20180731/swoole.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
赞
0
回复
2021-03-17
鲁飞
回复
吧吧吧v
先加载json扩展。
赞
0
回复
微信公众号
热门内容
暂无回复的问答
- CodeGalaxy K3s 轻量集群节点之间如何实现负载均衡
- 关于openssl CURL WARNING swSSL_connect: SSL_connect(fd=69) failed. Error: error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small[1|394]
- 多个模型如何进行事务异常回退?
- websocket开启wss报错
- 协程tcp服务器如何使用多进程?recv()方法接收信息,打印出来的pid一直是同一个。没用使用到多进程啊。