本地环境上的 Xdebug 错误 [无法加载 /usr/local/lib/php/pecl/

我想在 vscode 上使用 Xdebug。


我在阅读官方文档时尝试了它,但无法让它工作并收到以下错误。


Failed loading /usr/local/lib/php/pecl/20190902/xdebug.so:  dlopen(/usr/local/lib/php/pecl/20190902/xdebug.so, 9): no suitable image found.  Did find:

        /usr/local/lib/php/pecl/20190902/xdebug.so: stat() failed with errno=20

PHP--ini


Failed loading /usr/local/lib/php/pecl/20190902/xdebug.so:  dlopen(/usr/local/lib/php/pecl/20190902/xdebug.so, 9): no suitable image found.  Did find:

    /usr/local/lib/php/pecl/20190902/xdebug.so: stat() failed with errno=20

Configuration File (php.ini) Path: /usr/local/etc/php/7.4

Loaded Configuration File:         /usr/local/etc/php/7.4/php.ini

Scan for additional .ini files in: /usr/local/etc/php/7.4/conf.d

Additional .ini files parsed:      /usr/local/etc/php/7.4/conf.d/ext-opcache.ini

还有其他人遇到过同样的问题吗?谢谢。


慕沐林林
浏览 79回答 1
1回答

MMTTMM

添加了export PATH="$(brew --prefix php)/bin:$PATH"到~/.bash_profile.您可以在编辑文件后运行source ~/.bash_profile以使更改生效。
打开App,查看更多内容
随时随地看视频慕课网APP