【发布时间】:2019-11-06 09:38:03
【问题描述】:
我已尝试在我的计算机上安装 PHP 的 Xdebug 扩展程序(Linux Mint,PHP 版本 7.3.6)。
我已按照Xdebug wizard page 的说明进行操作。完成后,我在终端中运行了以下命令:
php --version
它显示了我的 PHP 版本,但也显示了以下警告:
加载 /usr/lib/php/20180731/xdebug.so 失败:/usr/lib/php/20180731/xdebug.so:未定义符号:gc_globals
在调用 phpinfo() 时,Xdebug 也没有被列为启用的扩展。能否请您帮忙,我的 Xdebug 安装可能在哪里出现问题?
我已经使用向导页面中的以下步骤安装了 Xdebug:
• Download xdebug-2.7.2.tgz
• Install the pre-requisites for compiling PHP extensions.
• On your Ubuntu system, install them with: apt-get install php-dev autoconf automake
• Unpack the downloaded file with tar -xvzf xdebug-2.7.2.tgz
• Run: cd xdebug-2.7.2
• Run: phpize (See the FAQ if you don't have phpize).
•
• As part of its output it should show:
•
• Configuring for:
• ...
• Zend Module Api No: 20180731
• Zend Extension Api No: 320180731
• If it does not, you are using the wrong phpize. Please follow this FAQ entry and skip the next step.
•
• Run: ./configure
• Run: make
• Run: cp modules/xdebug.so /usr/lib/php/20180731
• Edit /etc/php/7.3/cli/php.ini and add the line
• zend_extension = /usr/lib/php/20180731/xdebug.so
【问题讨论】:
标签: php installation xdebug