【问题标题】:Failing to build xdebug无法构建 xdebug
【发布时间】:2013-01-03 02:35:53
【问题描述】:

我正在尝试在我的 Mac 上安装带有 MAMP 的 xdebug。我下载了xdebug-2.2.1.tgz 并按照xdebug 向导运行phpize。我跑了make,然后我被告知/Applications/MAMP/bin/php/php5.4.4/include/php/Zend/* 中有一些丢失的文件。所以,我用谷歌搜索,我看到我必须下载 php5.4.4,然后将一些文件推送到我在/Applications/MAMP/bin/php/php5.4.4/include/php 中创建的新“包含”目录中。但是当我再次尝试构建时,我收到了这条消息:

/Applications/MAMP/bin/php/php5.4.4/include/php/Zend/zend.h:51:11: fatal error: 
      'zend_config.h' file not found
# include <zend_config.h>

我该怎么办?我在哪里可以得到这个文件?

【问题讨论】:

  • 它在您的Zend/ 目录中吗?
  • @iputonmyrobeanwizardhat :不,在我的 Zend 目录中,我有: zend_config.nw.h , zend_config.w32.h

标签: php build xdebug


【解决方案1】:

我终于设法安装了 xdebug。事实上,我必须安装 Xcode 开发工具,然后从 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/php into /Applications/MAMP/bin/php/php5.4.4/include 然后它起作用了!

【讨论】:

    【解决方案2】:

    确实,我想也许make命令找不到头文件。所以我尝试更改makefile:

    INCLUDES = -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
    

    INCLUDES = -I{Your Path to php_dir}/php -I{Your Path to php_dir}/php/main -I{Your Path to php_dir}/php/TSRM -I{Your Path to php_dir}/php/Zend -I{Your Path to php_dir}/php/ext -I{Your Path to php_dir}/php/ext/date/lib
    

    你可以参考这个问题来改变makefile Describing header file locations in makefile

    您可以使用此命令查找 php.h

    sudo find / -name php.h
    

    如果你没有php header,你可以安装xcode。

    做完这些,一切都准备好了,尽情享受吧!

    【讨论】:

      猜你喜欢
      • 2019-09-03
      • 1970-01-01
      • 1970-01-01
      • 2013-01-13
      • 2013-05-31
      • 2020-09-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多