在MacOs Mojave上安装xdebug-找不到'php.h'文件 [英] Installing xdebug on MacOs Mojave - 'php.h' file not found

查看:546
本文介绍了在MacOs Mojave上安装xdebug-找不到'php.h'文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在MacOs Mojave上安装xdebug,但出现此错误

I try to install xdebug on MacOs Mojave but get this error

/private/tmp/pear/install/xdebug/xdebug.c:25:10: fatal error: 'php.h' file not found

已安装命令行工具.

推荐答案

我在尝试在系统上编译xdebug时遇到了这种情况,我必须执行以下操作才能使其正常工作

I ran into this trying to compile xdebug on my system, I had to do the following to get it to work

1)(重新)安装命令行工具(我曾经安装过它们,但是/Library/Developer/CommandLineTools/下的文件丢失了,所以我必须将其删除...)

1) (Re)install the command line tools (I had installed them at one point, but the files under /Library/Developer/CommandLineTools/ were missing so I must have deleted it...)

xcode-select --install

2)重新安装头文件

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

贷记到@donatJ- https://stackoverflow.com/a/52612102/649915

Credit to @donatJ - https://stackoverflow.com/a/52612102/649915

这篇关于在MacOs Mojave上安装xdebug-找不到'php.h'文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆