我本地开发环境是用的mac的M2芯片机器,使用phpswoole/swoole:4.8-php7.4-alpine作为基础镜像创建的容器,
尝试将help里的swoole_loader_74_macos_arm64.so放入php扩展目录/usr/local/lib/php/extensions/no-debug-non-zts-20190902,然后直接在/usr/local/etc/php/conf.d/docker-php-ext-swoole.ini中加了一行extension = swoole_loader_74_macos_arm64.so,在容器内启动swoole时候依旧报错如下:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20190902/swoole_loader_74_macos_arm64.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20190902/swoole_loader_74_macos_arm64.so (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20190902/swoole_loader_74_macos_arm64.so: Exec format error), /usr/local/lib/php/extensions/no-debug-non-zts-20190902//usr/local/lib/php/extensions/no-debug-non-zts-20190902/swoole_loader_74_macos_arm64.so.so (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20190902//usr/local/lib/php/extensions/no-debug-non-zts-20190902/swoole_loader_74_macos_arm64.so.so: No such file or directory)) in Unknown on line 0
求解。
{{item.user_info.nickname ? item.user_info.nickname : item.user_name}}
作者 管理员 企业
{{itemf.name}}
{{itemc.user_info.nickname}}
{{itemc.user_name}}
回复 {{itemc.comment_user_info.nickname}}
{{itemf.name}}