简体   繁体   English

如何在OSX Lion上为Xcode安装其他软件包以允许MacPorts工作

[英]How do i install additional packages for Xcode on OSX Lion to allow MacPorts to work

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 Development(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,所以我不熟悉它。

The command line tools aren't included in the default install of Xcode anymore. 命令行工具不再包含在Xcode的默认安装中。 Goto the Xcode Preferences --> Downloads Pane --> click the Install button beside "Command Line Tools". 转到Xcode首选项 - >下载窗格 - >单击“命令行工具”旁边的“安装”按钮。 If you don't have Xcode installed you can get the command line tools separately as explained here.. 如果您没有安装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/

You probably got Xcode 4.1 from the Mac App Store. 你可能从Mac App Store获得了Xcode 4.1。 In that case, you haven't got Xcode 4.1 installed. 在这种情况下,您还没有安装Xcode 4.1。 However, you now have an Xcode installer in your Applications directory. 但是,您现在在Applications目录中有一个Xcode安装程序。

Spotlight should find it in any case. Spotlight应该在任何情况下都能找到它。

The App Store installs the XCode installer, not Xcode itself. App Store安装XCode安装程序,而不是Xcode本身。 The installer is in your applications folder. 安装程序位于应用程序文件夹中。 Run that. 跑吧。

Today, 16 Feb 2012, when I installed Xcode 4 from the App Store, there was no Setup. 今天,2012年2月16日,当我从App Store安装Xcode 4时,没有安装程序。 Just the app installed, because it was Xcode 4.3 ! 只是安装了应用程序,因为它是Xcode 4.3!

Make sure that you install Xcode 4.2 with UNIX Devel. 确保使用UNIX Devel安装Xcode 4.2。 to MacPorts works! 到MacPorts工作!

To get the Xcode 4.2 go to https://developer.apple.com . 要获取Xcode 4.2,请访问https://developer.apple.com

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM