How do I eliminate multiple versions of Xcode? - xcode

I installed homebrew, and it keeps complaining that:
Warning: Your Xcode (4.2) is outdated
Please install Xcode 4.6.2.
As I learned there is no way to update Xcode so I just downloaded / installed the latest version.
The warning did not go away, and as I learned, I now have 2 versions installed:
and the warning did not go away
How do I now eliminate the old version? I just wanted to update it really.

The /Developer location is now obsolete. Xcode now runs entirely from the application bundle in /Applications/Xcode.app.
To remove it properly, run this from Terminal:
sudo /Developer/Library/uninstall-devtools --mode=all
Although, I've simply moved /Developer it to the Trash in the past and that seemed to work fine.
You'll need to go into Xcode.app's preferences afterwards and install Command Line Tools from Downloads->Components. I came across a tutorial for setting up homebrew for new Xcode installations.

Related

Removing osx-gcc-installer

I'm using MAC OS X 10.8.5. I'm getting this error that I have osx-gcc-installer installed and I need to install either CLT or Xcode 5.0.1. However, I already have downloaded and installed CLT and Xcode 5.0.1, and I'm not sure how I'm suppose to remove osx-gcc-installer.
Errors I get:
Warning: You seem to have osx-gcc-installer installed.
Homebrew doesn't support osx-gcc-installer. It causes many builds to fail and
is an unlicensed distribution of really old Xcode files.
Please install the CLT or Xcode 5.0.1.
Some of the solutions I've found from another posts:
If something doesn't work as expected, feel free to install Xcode over this installation.
Once installed, you can remove Xcode completely with the following:
sudo /Developer/Library/uninstall-devtools -mode=all
It says, I need to install Xcode over if there's problem with osx-gcc-installer, but I've already installed Xcode. In this case, should I uninstall and reinstall my Xcode?
Also, I ran the code they provided and uninstalled the devtools.
I really hope there's an easier and effective way to remove osx-gcc-installer.

How to install Xcode 4.6 on Lion, needed for upgrading ruby with RVM

I was actually trying to update ruby on my OSX 10.7.5 with RVM, and after typing in the following command:
rvm install ruby
I got the following response:
Searching for binary rubies, this might take some time.
Checking requirements for osx.
Installing requirements for osx.
Updating system.......
Error running 'requirements_osx_brew_update_system ruby-2.0.0-p247',
please read /Users/username/.rvm/log/1381215459_ruby-2.0.0-p247/update_system.log
Requirements installation failed with status: 1.
Then, when I checked out the update_system.log, it showed me the actual code of a function called requirements_osx_brew_update_system(), which contained the following error message:
Xcode version older than 4.6.2 installed, download and install newer version from:
http://connect.apple.com
After installation open Xcode, go to Downloads and install Command Line Tools.
Then I proceeded to find an update for Xcode, but only found the latest Xcode 5.0, which is apparently incompatible with my OSX 10.7. Although ultimately my goal is to update ruby and install rails, which I'm sure there are many other ways to do, I'd still like to find out if I could possibly install Xcode 4.6.2 on my OSX 10.7.
UPDATE: Sorry folks, apparently my version of XCode is v4.6.1 so updating the command line tools will not work in all cases (I know for a fact it doesn't work if you're on XCode v4.3.3). YMMV
I ran into the same issue trying to do an rvm install. I got an error telling me that I needed XCode 4.6.2 or later.
Turns out all it needed was the latest version of the XCode command line tools. I followed the instructions for upgrading my command line tools from this macports article:
open the Xcode application
go to the Preferences window
open the Downloads section
click the Install button next to "Command Line Tools"
After doing this I was able to run my rvm install command and it didn't complain about upgrading XCode anymore (and finished successfully).
It seems you're going to have to install under Xcode 5. So go to https://developer.apple.com/downloads/ and log in with your developer ID to get to the older versions. There should be a 4.6.3 that you could potentially download, or even 4.6.2.
Or you could upgrade your OSX to 10.8.
Whichever you prefer.
I can't give you a direct link to it, since you need your developer information to log in yourself. But all the downloads you need are in the link provided above once you log in.
Open xcode and update it via the app store.
Then
xcode-select --install
This will install xcode via the command line

Uninstall Xcode 4.2.1 after installing 4.3.1

I begrudgingly updated to Lion from snow leopard. I then updated XCode to 4.3.1 which as part of the update uninstalled 4.2 from snow leopard. I then realized that one of my other dev tools does not work with 4.3.1 at all, so I installed 4.2.1 along side it in the hopes of fixing things. It didn't. How do I remove 4.2.1 so I'm just left with 4.3.1?
I tried deleting 4.3.1 and re-installing hoping it would detect 4.2.1 and remove it like it did when I first upgraded but no dice.
Searching the web shows I need to run uninstall-devtools however I can't find it anywhere, /Developer doesn't exist...
Trying to re-install 4.2.1 in the hopes there was an uninstaller buried in there says "Xcode install assistant can't be installed because xcode is already installed" (it didn't say this the first time obviously) so I can't re-install without 4.3.1 in place in the hopes of getting a /Developer folder...
There appears to be no uninstall-devtools burried in 4.3.1 (and I have command line tools installed as well).
I can't find 4.2.1, maybe it didn't install (I forgot to check disc capacities before/after) but then why can't I try to install it again without any xcode installed?
Install Xcode 4.2.1 again and then uninstall it:
sudo /Developer/Library/uninstall-devtools --mode=all
It turns out that 4.2.1's installer actually installs an Xcode installer into your applications folder, which in turn actually installs Xcode. The solution is find the installed installer (makes so much sense...) and install Xcode an things behave as expected.
The versions of Xcode that support installation into /Applications instead of /Developer in theory support being removed just via dragging to the trash.
In practice, I'm not sure I trust the process, and I wish there was still a more robust cleanup script.
Search "Xcode 4.2" in spotlight or in finder it will find you the app then move it to trash .But dont forget to check version.

Uninstalling Xcode 3.2.6 from Lion 10.7.2

I've installed xCode 3.2.6 on my Lion 10.7.2.
After install I can't find the xCode icon to launch it. I've got to know 3.2.6 doesn't support Lion.
However, the worst thing happen when I tried to uninstall it with
sudo /Developer/Library/uninstall-devtools --mode=all
Unfortunately uninstall-devtools wasn't there. I'm stuck middle of nowhere.
Does anybody have any idea how to uninstall it and install xCode 4.2?
Following command fire on terminal and remove the all files and folder of xcode
sudo /Developer/Library/uninstall-devtools --mode=all
also more information and show log of the uninstal so go refrence link here
If /Developer/Library/uninstall-devtools does not exist skip that step.
Delete the /Develop folder if it exists.
Install xCode 4.2. Th eXcode icon will be in /Developer/Applications
The Xcode latest beta is even easier to install, get it if you have access.
If you install Xcode 3 from the GUI on Lion, you'll end up with a bunch of random tools but not the actual Xcode Toolset. In that case, you can use the uninstall-dev-tools located in /Library/Developer/Shared (rather than /Developer/Library).
You can fully install XCode 3 on Lion via the Terminal with the following commands:
export COMMAND_LINE_INSTALL=1
open "/Volumes/Xcode and iOS SDK/Xcode and iOS SDK.mpkg"
careful: if you work in ruby, you better stay with xCode 4.1

How should I upgrade Xcode after upgrading to OS X Lion?

I've just found out, that my homebrew doesn't work anymore after I upgraded to OS X Lion.
$ brew install clojure
Warning: Xcode is not installed! Builds may fail!
Error: No such file or directory - /usr/bin/cc
and
$ brew doctor
We couldn't detect gcc 4.2.x. Some formulae require this compiler.
We couldn't detect gcc 4.0.x. Some formulae require this compiler.
You have no /usr/bin/cc. This will cause numerous build issues. Please
reinstall Xcode.
Setting DYLD_LIBRARY_PATH can break dynamic linking.
You should probably unset it.
after some googling, I found out that I should upgrade Xcode to version 4.1. The problem is, I have version 3.2.5 installed and I can't find any way of uninstalling it.
When I look at App Store, it looks like I don't have Xcode installed at all. I'm afraid that if I install it via App Store, it will somehow conflict with the version I have currently installed. However I can't find it in Applications, and I can't find any update function either.
Software Update doesn't prompt me to update Xcode, and I also don't see it in Installed Software.
What should I do?
Thanks to the readme found at /Developer, I found a way to uninstall Xcode via
$ sudo /Developer/Library/uninstall-devtools --mode=all
edit: I just ran the installer for Xcode 4, and it detected old version of Xcode, offering me to move it to /Developer-old.
I fixed it by
In theory this should work if you have Xcode4.3 installed (in /Applications):
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/

Resources