【问题标题】:installing Xdebug on CentOS7, I get error undefined symbol: compiler_globals在 CentOS7 上安装 Xdebug,我得到错误 undefined symbol: compiler_globals
【发布时间】:2017-11-06 00:27:55
【问题描述】:

我在 php.ini 上定义了 xdebug.so 路径。

但我在 phpinfo() 函数中看不到 xdebug 信息。

错误组合如下。

加载/usr/lib64/php/modules/xdebug.so失败:/usr/lib64/php/modules/xdebug.so:未定义符号:compiler_globals

我该如何解决这个问题?

使用php 7.1.4版本。

【问题讨论】:

    标签: php centos xdebug


    【解决方案1】:

    确保使用正确的php-config 编译Xdebug。

    https://xdebug.org/download.php手动下载xdebug.tgz,然后按照https://xdebug.org/wizard.php上的说明进行操作。

    只要确保:

    1. 当您执行phpize 步骤时,您使用正确的phpize 二进制文件进行PHP 安装。如果是自定义安装,它通常类似于/usr/local/php/bin/phpize
    2. 同样适用于运行./configure 步骤。提供更正 php-config 二进制文件的路径,如下所示:./configure --with-php-config=/usr/local/php/bin/php-config

    只有这样你才能编译扩展并将xdebug.so文件复制到扩展目录。如果您之前至少编译过该目录一次,请记得先make clean

    【讨论】:

    • 这是我的 Ubuntu 18.0.4 和 php 7.3 的解决方案,路径是 /usr/bin/phpize7.3--with-php-config=/usr/bin/php-config7.3
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-22
    • 1970-01-01
    • 2021-01-27
    • 2017-04-20
    • 2022-01-24
    相关资源
    最近更新 更多