安装hiredis后swoole扩展消失

Posted setevn

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装hiredis后swoole扩展消失相关的知识,希望对你有一定的参考价值。

php -m报错:

PHP Warning: PHP Startup: Unable to load dynamic library ‘swoole‘ (tried: /home/work/study/soft/php/lib/php/extensions/no-debug-non-zts-20170718/swoole (/home/work/study/soft/php/lib/php/extensions/no-debug-non-zts-20170718/swoole: cannot open shared object file: No such file or directory), /home/work/study/soft/php/lib/php/extensions/no-debug-non-zts-20170718/swoole.so (libhiredis.so.0.13: cannot open shared object file: No such file or directory)) in Unknown on line 0

解决方案:

用vi打开当前用户的bash_profile

vi ~/.bash_profile
在最后一行添加:   export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

最后再 source ~/.bash_profile


以上是关于安装hiredis后swoole扩展消失的主要内容,如果未能解决你的问题,请参考以下文章

swoole异步redis安装前置条件和流程

SWOOLE异步REDIS安装

ubuntu 安装swoole

swoole扩展安装

swool安装

Mac下PHP7.3安装Swoole4.4扩展教程