安装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
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步