我如何在 OSX Lion 上为 Xcode 安装额外的软件包以允许 MacPorts 工作
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7442447/
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
How do i install additional packages for Xcode on OSX Lion to allow MacPorts to work
提问by Paul Taylor
When I try and install MacPorts it complains 'Xcode is not installed, or was installed with UNIX Development (10.5+) or Command Line Support (10.4) deselected.'
当我尝试安装 MacPorts 时,它抱怨“未安装 Xcode,或已安装 UNIX 开发 (10.5+) 或取消选择命令行支持 (10.4)。”
I do have Xcode installed from the Appstore so I guess I just have to install these extra parts but how ?
我确实从 Appstore 安装了 Xcode,所以我想我只需要安装这些额外的部分,但如何安装?
Ive read a couple of questions on Stack Overflow about this but I think the answers must be outdated as they do notmake sense for me, I do not have an Xcode dmg I can reinstall from, and I can't see anything useful in /Developer either, or any preferences within Xcode itself.
我已经阅读了有关 Stack Overflow 的几个问题,但我认为答案必须过时,因为它们对我来说没有意义,我没有可以从中重新安装的 Xcode dmg,而且我在 /Developer 中看不到任何有用的东西或者 Xcode 本身的任何首选项。
I only want Xcode for the purposes of using Macports so I'm not familiar with it.
我只想要 Xcode 用于使用 Macports,所以我不熟悉它。
采纳答案by Jean-Denis Muys
You probably got Xcode 4.1 from the Mac App Store. In that case, you haven't got Xcode 4.1 installed. However, you now have an Xcode installer in your Applications directory.
您可能从 Mac App Store 获得了 Xcode 4.1。在这种情况下,您还没有安装 Xcode 4.1。但是,您现在的 Applications 目录中有一个 Xcode 安装程序。
Spotlight should find it in any case.
Spotlight 无论如何都应该找到它。
回答by EddyGL
The command line tools aren't included in the default install of Xcode anymore. Goto the Xcode Preferences --> Downloads Pane --> click the Install button beside "Command Line Tools". If you don't have Xcode installed you can get the command line tools separately as explained here..
命令行工具不再包含在 Xcode 的默认安装中。转到 Xcode 首选项 --> 下载窗格 --> 单击“命令行工具”旁边的安装按钮。如果您没有安装 Xcode,您可以按照此处的说明单独获取命令行工具。
http://osxdaily.com/2012/07/06/install-gcc-without-xcode-in-mac-os-x/
http://osxdaily.com/2012/07/06/install-gcc-without-xcode-in-mac-os-x/
回答by Michael J. Barber
The App Store installs the XCode installer, not Xcode itself. The installer is in your applications folder. Run that.
App Store 安装 XCode 安装程序,而不是 Xcode 本身。安装程序位于您的应用程序文件夹中。运行那个。
回答by HugoCore
Today, 16 Feb 2012, when I installed Xcode 4 from the App Store, there was no Setup. Just the app installed, because it was Xcode 4.3 !
今天,2012 年 2 月 16 日,当我从 App Store 安装 Xcode 4 时,没有安装程序。只安装了应用程序,因为它是 Xcode 4.3 !
Make sure that you install Xcode 4.2 with UNIX Devel. to MacPorts works!
确保使用 UNIX Devel 安装 Xcode 4.2。到 MacPorts 工作!
To get the Xcode 4.2 go to https://developer.apple.com.
要获取 Xcode 4.2,请访问https://developer.apple.com。