• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

mac 10.11 phpize 报错问题

php 搞代码 4年前 (2022-01-25) 15次浏览 已收录 0个评论
文章目录[隐藏]

新换了电脑,装一下PHP的php-protobuf 框架扩展,遇到一些问题,记录于此。

进入php-protobuf 页面 phpize 如下

<code>grep: /usr/include/php/main/php.h: No such file or directorygrep: /usr/include/php/Zend/zend_modules.h: No such file or directorygrep: /usr/include/php/Zend/zend_extensions.h: No such file or directoryConfiguring for:PHP Api Version:        Zend Module Api No:     Zend Extension Api No:  </code>

google之

解决方法:

sudo ln -s
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/ /usr/include

执行之

<code>ln: /usr/iclude: Operation not permitted</code>

报这个错误

/usr/ 下是没有include 这个文件夹的

还有mkdir include 创建不了文件夹 一样报Operation not permitted

求大神支招

回复内容:

新换了电脑,装一下PHP的php-protobuf 框架扩展,遇到一些问题,记录于此。

进入php-protobuf 页面 phpize 如下

<code>grep: /usr/include/php/main/php.h: No such file or directorygrep: /usr/include/php/Zend/zend_modules.h: No such file or directorygrep: /usr/include/php/Zend/zend_extensions.h: No such file or directoryConfiguring for:PHP Api Version:        Zend Module Api No:     Zend Extension Api No:  </code>

google之

解决方法:

sudo ln -s
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/ /usr/include

执行之

<code>ln: /usr/iclude: Operation not permitted</code>

报这个错误

/usr/ 下是没有include 这个文件夹的

还有mkdir include 创建不了文件夹 一样报Operation not permitted

求大神支招

本文来源gaodai$ma#com搞$$代**码)网8搞代gaodaima码

晕死,ls都在说什么,安装command line tool就自动会帮你配置好Unix开发环境的

<code>xcode-select --install</code>

php环境有问题了 brew重装php试试

<code>sudo ln -s/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/ /usr/include</code>

链接失败原因 10.11加强了系统保护 /usr 木有操作权限

解决方法

暂时停用系统保护:

按下开机键时即刻按住 command R(“R”字母键),中间的苹果标志及进度条出现后放开按键,等待恢复安装界面和 “OS X 实用工具”
窗口出现后,点击顶部菜单栏的 “实用工具”,在其下拉菜单点选运行 “终端”,在终端闪动字符的位置直接输入“csrutil disable”
并回车,重新启动电脑。

当然也可以直接用XAMPP 中的phpize


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:mac 10.11 phpize 报错问题

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址