make: /usr/bin/gcc-4.2: No such file or directory
Not wanting to sink endless hours into diagnosing and working around the problem, I have temporarily suppressed my natural loathing of OS X package management tools and followed the instructions here:
su [admin-user] ruby <(curl -fsSk https://raw.github.com/mxcl/homebrew/go) brew doctor brew tap homebrew/dupes sudo ln -s /usr/local/bin/gcc-4.2 /usr/bin/gcc-4.2
This unblocks me for now. Moving forward my preference is to achieve this without relying on Homebrew (the fact that it wants to mess with the ownership and permissions on
/usr/local/ horrifies me).
After a while I revisited this topic and uninstalled Homebrew to see if the issue was resolved or not:
cd /usr/local sudo rm -rf Cellar sudo brew prune # perms were "messed up", needed to use sudo sudo rm -rf Cellar Library bin/brew share/man/man1/brew.1 .gitignore README.md /Library/Caches/Homebrew
If it turns out that things break again in the future, a simple symlink as suggested in these Stack Overflow posts is probably sufficient: