MAC 执行phpize报错:grep: /usr/include/php/main/php.h: No such file or director。。。

15 篇文章 0 订阅

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:  
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

我的mac版本是10.15.3
解决:

 xcode-select --install		# 安装常用开发工具,如:git等。
 sudo mount -uw /			# 根目录挂载为可读写,否则无法在/usr/下建立文件,本修改重启前有效。
 sudo ln -s "$(xcrun --show-sdk-path)/usr/include" /usr/include
 export SDKROOT="$(xcrun --show-sdk-path)" 								# 设置环境变量
 echo "export SDKROOT=\"\$(xcrun --show-sdk-path)\"" >> ~/.bash_profile # zsh的自行搞定
 sudo DevToolsSecurity -enable 											# 将系统置于开发模式

xcode-select --install报错查看

  • 4
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值