在 Yosemite 和 Xcode 安装后缺少/usr/include? [英] Missing /usr/include after Yosemite and Xcode install?

查看:72
本文介绍了在 Yosemite 和 Xcode 安装后缺少/usr/include?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

发现另外两个工作站上没有发生的奇怪问题.最近使用 Xcode 和命令行工具重新安装了 Yosemite 之后,我发现我的 /usr/include 不在这个特定的工作站上.我现在可以用 Homebrew 构建软件包,其他各种任务看起来都很好,但是当我开始构建一些内核扩展时,令我震惊的是,我发现这个文件夹完全没有.对这里可能发生的事情有什么想法吗?

Seeing an odd issue that's not happening on two other workstations. After a recent reinstall of Yosemite with Xcode and the command line tools, I've found that my /usr/include is not present on this particular workstation. I'm able to build packages with Homebrew at the moment and various other tasks work seemingly fine, but when I went to start building some kernel extensions, to my horror, I found this folder entirely absent. Any thoughts on what may be going on here?

推荐答案

有趣的是,这个问题的答案只是带有命令行工具的 Xcode 6.1.1 没有正确安装.我能够从 shell 手动执行 xcode-select --install 之后 /usr/include 终于出现了.

Interestingly the answer to this was simply that Xcode 6.1.1 with command line tools did not install correctly it appears. I was able to manually execute xcode-select --install from the shell and after that /usr/include finally showed up.

我不太明白为什么它会像其他工作站一样工作,但这种特殊情况显然存在一些我无法隔离的问题.无论如何,希望这可以帮助其他遇到这种奇怪情况的人.我知道 IRC 上的其他人也认为这很奇怪,但至少这解决了它.

I can't quite see why this worked out the way it did as other workstations have been fine, but this particular scenario obviously had some problem that I'm not able to isolate. Regardless, hopefully this may help someone else who runs into this odd situation down the road. I know other folks on IRC likewise thought it was odd, but at least this solved it.

这篇关于在 Yosemite 和 Xcode 安装后缺少/usr/include?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆