swoole / phpy

Connecting the Python and PHP ecosystems together
Apache License 2.0
543 stars 44 forks source link

加载phpy扩展失败 #33

Closed waojie closed 10 months ago

waojie commented 10 months ago

在php:8.1.27-fpm-alpine容器中

  1. 编译完成执行docker-php-ext-enable phpy后 会生成docker-php-ext-phpy.ini文件内容是extension=phpy 执行php --ri phpy会报错: Warning: PHP Startup: Unable to load dynamic library 'phpy' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20210902/phpy (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20210902/phpy: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20210902/phpy.so (Error relocating /usr/local/lib/php/extensions/no-debug-non-zts-20210902/phpy.so: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv: symbol not found)) in Unknown on line 0 2.手动更改docker-php-ext-phpy.ini文件内容为extension=phpy.so 执行php --ri phpy会报错: Warning: PHP Startup: Unable to load dynamic library 'phpy.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20210902/phpy.so (Error relocating /usr/local/lib/php/extensions/no-debug-non-zts-20210902/phpy.so: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv: symbol not found), /usr/local/lib/php/extensions/no-debug-non-zts-20210902/phpy.so.so (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20210902/phpy.so.so: No such file or directory)) in Unknown on line 0 Extension 'phpy' not present.
waojie commented 10 months ago

换成php:8.1.27-fpm就可以了