Mac 10.6.8 - Homebrew - Xcode not installed - xcode

I just started using Homebrew, but I am running into trouble right away.
The problem is that brew doctor keeps telling me 'Xcode not installed'.
I have seen a similar question (15891818) on this topic, but there was just a partial solution for Node.js
I first had Xcode 3.1 installed, and when I ran brew doctor it correctly informed me my Xcode was an old version, and told me to upgrade to 3.2.6. So I downloaded Xcode 3.2.1 from the apple site, after that I did a Software Update and upgraded to 3.2.6.
After this, Homebrew just doesn't find the Xcode installation at all. (I even restarted my computer)
I am on OS 10.6.8.
any ideas?
Thanks a lot

homebrew needs gcc, which i got from here without having to install xcode https://github.com/kennethreitz/osx-gcc-installer

Related

Git for Mac fails to launch: "illegal instruction"

...I've looked pretty carefully (I believe), and have been unsuccessful at getting an installation of Git for my Mac.
For various reasons, I'm running 10.6.8 of Mac OS X and will not be changing that anytime soon.
I've already gathered and installed the bundle exposed here:
https://help.github.com/articles/set-up-git
The installation instructions are pretty clear, and it's obvious to me that the package installed. But any attempts to use the git client from the command line result in an "Illegal Instruction" error.
I've sifted pretty carefully through information available here:
http://git-scm.com/book/en/Getting-Started-Installing-Git
There is another bundle that seems to be available. It is called "GitHub for Mac 1.7.5, but it appears to require Mac OS X 10.7 or later.
Has anyone else encountered this difficulty? Must I build from source?
I'm a couple of hours of reading and hacking into this effort? Is there something obvious that I've not considered?
Yes, I've had the same exact problem, and what I did is installed an earlier build from here:
https://code.google.com/p/git-osx-installer/
I'm running 10.6.8 and installed the newest build there, 1.8.4.2
SourceForge only has 1.9.0 and 1.8.5.2
http://sourceforge.net/projects/git-osx-installer/reviews?source=navbar
Someone on the reviews said they had trouble with both and went back to 1.7. I would try that if 1.8.4.2 doesn't work.
I was able to run the config commands without an illegal instruction error, at least.
I had this problem and was able to install a working version using Homebrew.
# first uninstall the broken version
# mount the DMG for the broken version using Finder
# "type" this with the tab key! it saves typing and fixes the version number
cd /Volumes/Git\ 2.0.1\ Snow\ Leopard\ Intel\ Universal/
./uninstall.sh
# make bash forget about the uninstalled binary
hash -r
cd
# now install the working version
# assumes you have Homebrew installed
brew install git
git version
I had this today on Snow Leopard after running the suggested git installer from git-scm. Really horrible. Found that installing Macports using their old Snow Leopard package and then
sudo port install git +svn +doc +bash_completion +gitweb
installs git plus its dependencies and git now works fine; version 1.9.3 installed and working on 10.6.8.
I had the same problem. There are various methods for downloading and installing git - Try macports or homebrew. The thing that finally worked for me was having xcode 3.2.6 installed with the additional command line tools - version 3.2 that comes with the leopard install disk wasn't enough. You can install xcode etc. from the disk and then run software update to upgrade it to 3.2.6.
The latest build for Snow Leopard in the official git-osx-installer repo is Git 2.3.5 currently. You can download it from http://sourceforge.net/projects/git-osx-installer/files/git-2.3.5-intel-universal-snow-leopard.dmg/download using web browser. This installation works for me on OS X 10.6.8.
Or you can check yourself for a newer version: http://sourceforge.net/projects/git-osx-installer/files/
Yes - it seems that it does not support the older OS version (mine was 10.6.8). I upgraded to the newest Mac OS 10.9.4 (the installation will take a while), reinstalled the Git software (note that it will ask for xcode to be installed, which I proceeded), and everything works fine from there. Hope this helps.
Ref : https://help.github.com/articles/does-github-for-mac-run-on-os-x-10-6-snow-leopard
To quote:
Does GitHub for Mac run on OS X 10.6 Snow Leopard?
No, GitHub for Mac requires OS X 10.7 (Lion) or higher.
We made this decision because the app relies on a number of
technologies which are not available in Mac OS X 10.6 or earlier. We
want to provide the best experience possible for the app's users, so
we've made the choice to only support 10.7 and above, and not make
earlier versions available.

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

"The installed version of Xcode (3.1.4) is too old" error in port after installing Xcode 4.3

A have freshly checked-out from svn, built and installed MacPorts. I have installed Xcode4.3. I get the following error when trying to call "sudo port install X":
Error: The installed version of Xcode (3.1.4) is too old to use on the installed OS version. Version 4.1 or later is recommended on Mac OS X 10.7.
"xcodebuild -version" returns:
XcodeComponent versions: DevToolsCore-1809.0; DevToolsSupport-1806.0
BuildVersion: 10M2518
I have recently updated MacOS to Lion and I used to have an older version of xCode in SnowLeopard, which didn't work in the new system. I didn't uninstall it explicitly, but I also don't find any trace of the old Xcode on my system.
Any ideas? Please, help!
Xcode 4.3 should prompt you to remove any older versions when you run it for the first time, but check to make sure you don't have a /Developer directory anyway.
Have you run sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer? What does xcode-select -print-path tell you?
I just encountered the same problem as the OP and found this thread in a search. Installing Xcode 4.3 today didn't prompt for removal of older version (at least that I recall seeing), and /Developer hierarchy is still present. Renaming to /Developer.ex solved MacPort's problem. Can I safely delete /Developer completely?

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