升级到 Mountain Lion 和 XCode 4 打破了我的“make”?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11705912/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Upgrading to Mountain Lion and XCode 4 broke my "make"?
提问by Geoff
TL/DR: I upgraded stuff and now I can't run "make" - wtf?
TL/DR:我升级了东西,现在我无法运行“make” - wtf?
I just upgraded from Mac OS X 10.6 to 10.8 Mountain Lion, and then installed XCode 4 (formerly I had Developer/Applications/Xcode (3.something). XCode 4 installed through the App Store application to /Applications. Somewhere along the way, I can no longer run the "make" command. And I've tried looking in all the usual /bins but can't find a "make".
我刚刚从 Mac OS X 10.6 升级到 10.8 Mountain Lion,然后安装了 XCode 4(以前我有 Developer/Applications/Xcode (3.something)。XCode 4 通过 App Store 应用程序安装到 /Applications。一路走来,我无法再运行“make”命令。我已经尝试在所有常用的/bins 中查找,但找不到“make”。
Anyone know how to get my "make" command back?
任何人都知道如何让我的“make”命令回来?
Upgrading Apple stuff always breaks something... (it also broke my "git" command but I got that one back)
升级苹果的东西总是会破坏一些东西......(它也破坏了我的“git”命令,但我得到了那个)
回答by torrey.lyons
You need to install the command line tools as described at installing "make" on Mac. They are not installed by default in Xcode 4.
您需要按照在 Mac上安装“make”中的说明安装命令行工具。默认情况下,它们不会安装在 Xcode 4 中。
回答by Guy
Easiest way to install:
最简单的安装方法:
- Launch XCode
- Go to Preferences > Downloads > Components
- Click "Install" next to 'Command Line Tools'
- 启动 XCode
- 转至首选项 > 下载 > 组件
- 单击“命令行工具”旁边的“安装”