In file included from /Users/sxf/Downloads/swoole-src/swoole.c:19:
./php_swoole.h:22:10: fatal error: ‘php.h’ file not found
#include “php.h”
^
1 error generated.
make: *** [swoole.lo] Error 1
错误。解决办法如下:
sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include /usr/include
这里注意一下,你使用的系统版本号。
注意MacOSX10.10.sdk修改为自己系统的版本号
另外也有可能遇到提示 pcre.h 找不到,直接安装一下即可 brew install pcre