首页 > 其他 > mac 10.14 phpize报错解决办法

mac 10.14 phpize报错解决办法

jovi

2023-09-27

mac 终端执行  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:   

原因:原因是/usr 目录下没有include

解决方法:

安装command line tool就自动会帮你配置好Unix开发环境

命令:

xcode-select —install

安装完之后执行:

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /就会生成/usr/include目录

这个时候再执行phpize就可以了


文章版权声明
1、本网站名称:阿V编程
2、本站永久网址:https://www.1892zyw.com
3、本网站的部分文章内容/部分资源可能来源于网络,仅提供给大家学习或参考,如有侵权,请联系站长QQ进行删除处理。
4、本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
5、本站一律禁止以任何方式发布或转载任何违法的相关信息,如有发现请向站长举报