Xdebug .so文件存在,但仍未报告

问题描述 投票:0回答:3

这是/etc/php/7.2/cli/conf.d/20-xdebug.ini内容:

zend_extension=xdebug.so
xdebug.remote_enable=on
xdebug.remote_autostart=off

这是我通过运行php得到的错误:

PHP Warning:  Failed loading Zend extension 'xdebug.so' (tried: /usr/lib/php/20170718/xdebug.so (libc.musl-x86_64.so.1: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/xdebug.so.so (/usr/lib/php/20170718/xdebug.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

但是/usr/lib/php/20170718/xdebug.so存在并且具有读取权限:

# ls -l /usr/lib/php/20170718/xdebug.so
-rw-r--r--. 1 root root 2078128 Jan 16 11:15 /usr/lib/php/20170718/xdebug.so

将扩展路径更改为完整路径也无济于事。

可能是什么原因?

php xdebug
3个回答
0
投票

请参考以下链接,因为我认为它可以像我一样解决您的问题Installing Xdebug


0
投票

xdebug.ini文件中尝试此内容

zend_extension=xdebug.so
xdebug.remote_enable = 1
xdebug.remote_port = 9000 
xdebug.show_error_trace = 1 <--- you can skip this
xdebug.remote_autostart = 0

0
投票

似乎出厂的xdebug模块已损坏,并通过apt安装它解决了问题:

apt install php-xdebug

在通过apt安装源代码之前,我也尝试并编译了很多次源代码,但是每次都遇到相同的错误。但是确切原因仍然未知。

© www.soinside.com 2019 - 2024. All rights reserved.