如何在Yosemite上安装Xcode和命令行工具?

时间:2015-04-07 03:43:11

标签: xcode osx-yosemite

我按照这里的说明操作:

http://quantgreeks.com/how-to-install-xcode-command-line-tools-in-osx-yosemite/

但是,我不符合该教程的确切要求,因为我以前从未安装过Xcode。另外,我无法弄清楚如何下载Xcode。我最终到了App Store,在那里它说我的开发者帐户因安全原因被暂停 - 但我可以在Apple Developer区域登录。我最后来到这里:

https://developer.apple.com/devcenter/mac/index.action

我点击查看所有下载,然后我下载了Xcode 6.2 dmg文件。然后我点击了dmg文件,安装程序让我将Xcode图标拖到文件夹图标上。

我按照本教程中的其余步骤进行操作,在本教程结束时,它说要像这样测试您的安装:

$ xcode-select -p
/Library/Developer/CommandLineTools

但是,我得到了输出:

$ xcode-select -p
/Applications/Xcode.app/Contents/Developer

我有以下目录:

/Library/Developer/CommandLineTools

我的结论:

1)在教程中,请务必注意短语the Full Xcode Packagethe Xcode Command Line Tools之间的区别。

2)如果您安装Full Xcode Package,然后测试安装,我认为这可能是正确的输出:

$ xcode-select -p
/Applications/Xcode.app/Contents/Developer

3)如果只安装Xcode Command Line Tools,然后测试安装,那么这可能是正确的输出:

$ xcode-select -p
/Library/Developer/CommandLineTools

2 个答案:

答案 0 :(得分:4)

我按照this link检测并安装Xcode命令行工具。

这是验证完整Xcode包安装后你需要遵循的主要命令。

xcode-select --install

答案 1 :(得分:-1)

我按照this link安装Xcode命令行工具。

您可以根据OS X选择命令行工具 例如对我来说我有OS X 10.8.5我去了command_line_tools_for_osx_mountain_lion_april_2014

相关问题