So I upgraded to OS X Mountain Lion yesterday. The install was pretty smooth (though had a tough time with the redeem code for the upgrade, worked on the third code that Apple sent across).
Most of the software is working fine. However, I found that my existing Xcode installation needed an upgrade (via a Xcode install from the App Store).
The problem is that any new Xcode install seems to nuke the command line development tools (think make, autoconf, etc.). The solution is pretty simple though. Once Xcode has been installed, run Xcode and then open the preferences. There is a section on downloads, which lists installing the command line tools as an option.
Voila! Issue resolved.
Thanks. Ran into the same issue. You saved me some time.
I did the same thing ONLY when I look at the download section it says my command line tools are already installed. However, they don’t work. E.g. typing > man cat for instance gives man not found.
How do I force the reinstall of the command line tools?
John,
Can you check the PATH? It just might be a path setting issue in the shell.
I’ve checked. man, cat, grep, sudo aren’t on the computer! I just did a reinstall of Mountain Lion from the HL partition and then XCode allowed me to install the command line tools and it still doesn’t recognize these commands and they aren’t on the computer. Spotlight locates gzip and some others but not these main ones.
I guess I’m going to try erasing the drive, then recover from Time Capsule as of a couple of days ago when everything was working right. I have no idea how they “went away” or why they aren’t reinstalled.
As you suspected, it was a PATH issue. I learned a couple of things here:
1) Spotlight doesn’t index the /bin and other system areas. For developers sakes, I would like to be able to turn that on for indexing.
2) When you run port installs, which I had done to install gfortran, it modifies your .bash_profile file in your ~ area. After the install, the profile looks very messy and I noticed an inclusion in the path that I no longer use and while deleting it, I had inadvertently remove the $PATH from the redefinition of the PATH and thus the system information /bin, etc. was lost. I could look up some things like gzip and others I had installed using port and thought erroneously that I could look up cat, sudo, man, etc the same way. Normal unix commands to look things up didn’t work as the commands like find, file, whereis have to be in the path itself to work!
Thanks for the help.
Thanks, though seems like a #fail to not auto-install command-line tools as part of standard XCode install…
That GUI is not on Mtn Lion.
Kinda has to be considering they’re writing an article about it on mountain lion.
Thanks!!
For some reason I open my xCode prefs and there is no Download section.
Aye, the app store is telling me xCode is already installed but it is a really old version like 3.6. Isn’t the newer version more like 4.1?
Mike,
The current version of XCode (from the App Store) is 4.6.2. In this version (4.x), the download section has been moved and consolidated under the Components section (in preferences).
Hope this helps.
i cant find the standard tools in the command utilities