How to update Xcode to install “UNIX Development Support”?

我是研究僧i 提交于 2019-11-30 00:39:22

问题


I installed Xcode a long time ago.

Apparently I didn't check back then the "UNIX Development Support" checkbox.

Now I want to have them but when I click on the installation this is what appears:

The UNIX Development Support check box is disabled

Q: How can I install the UNIX Development Support? Is there a way to run some script that creates all the needed links from /Developer/ to /usr/bin ?

EDIT: Note: This is for old Xcode 3. Screens and tool names differ for Xcode 4 ("Unix Command Line Tools")


回答1:


With Xcode 4.3 (from Apple App Store) you can enable Unix Command Line Tools via the Xcode Menu: Preferences -> Download -> Components




回答2:


In xcode > 4.5 select Preferences -> Download -> Components -> Command Line Tools




回答3:


Finally.

I had to download from Apple's website the latest version of Xcode 3 (3.2) along with the iPhone SDK that I won't use in the near feature.

This time the "UNIX Development Support" was enabled:

So now I can compile from the command line!




回答4:


In the Xcode .dmg file, there is a Packages folder. You can manually install DeveloperToolsCLI.pkg which creates the link in /usr/bin.

At least, it worked for me.




回答5:


You can also right click the "Install Xcode X.X" icon and Show Package Contents then in Contents > Resources > Packages, you will find many packages from among which resides DeveloperToolsCLI.pkg. This package installs the files you want in /usr/bin.




回答6:


You should uninstall and then re-install the developer tools.

To uninstall the tools, run the following command in Terminal:

sudo /Developer/Library/uninstall-devtools --mode=all


来源:https://stackoverflow.com/questions/2693336/how-to-update-xcode-to-install-unix-development-support

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!