yasd
yasd copied to clipboard
MacbookPro16(Intel) macOs Monterey 安装php7.4.26后报错
bash-5.0# php -v PHP Warning: Failed loading Zend extension 'yasd' (tried: /usr/lib/php7/modules/yasd (Error loading shared library /usr/lib/php7/modules/yasd: No such file or directory), /usr/lib/php7/modules/yasd.so (Error loading shared library libboost_filesystem.so.1.72.0: No such file or directory (needed by /usr/lib/php7/modules/yasd.so))) in Unknown on line 0 PHP 7.4.26 (cli) (built: Jan 18 2022 21:29:34) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies
php 版本:php7.4.26 swoole 版本:4.8.7 系统:macOs Monterey
yasd版本:v0.3.9
You have not installed yasd. This is not enough:
zend_extension=yasd;
My way in Dockerfile:
RUN if [ "${WITH_DEBUG}" = "true" ] ; then \
apk add --no-cache boost-dev git autoconf g++ make \
&& git clone https://github.com/swoole/yasd "/tmp/yasd" \
&& cd "/tmp/yasd" \
&& phpize --clean \
&& phpize \
&& ./configure \
&& make clean \
&& make \
&& make install \
&& touch /usr/local/etc/php/conf.d/yasd.ini \
&& echo 'zend_extension=yasd' > /usr/local/etc/php/conf.d/yasd.ini \
&& echo 'yasd.debug_mode=remote' >> /usr/local/etc/php/conf.d/yasd.ini \
&& echo 'yasd.remote_host=host.docker.internal' >> /usr/local/etc/php/conf.d/yasd.ini \
&& echo 'yasd.remote_port=9003' >> /usr/local/etc/php/conf.d/yasd.ini; \
fi
可以考虑使用 swoole-src的 xdebug分支,https://github.com/swoole/swoole-src/tree/support-xdebug 可以直接使用xdebug进行调试,前提是PHP版本要大于等于8.1