PHP源码编译gRPC

Build from Source with gRPC C core library
编译PHP扩展,执行phpize ,提示如下错误:

grep: /usr/include/php/main/php.h: No such file or directory
grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:        
Zend Module Api No:     
Zend Extension Api No:  

解决方案

# 重启 按 ⌘+R , 菜单栏 > 实用工具 > 终端
csrutil disable
# 重启完成后
# 重新挂载,重要!!! 否则sudo也无法修改`/usr`目录
sudo mount -uw /
# 软链
sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/ /usr/include

你可能感兴趣的:(PHP源码编译gRPC)