mxcl/homebrew — Issue #10245: Issue with Command Line Tools for Xcode
Author: tabletcorry
Created: 2012-02-17 01:09:14+00:00
State: open

After running the uninstaller for Xcode (`sudo /Developer/Library/uninstall-devtools –mode=all`) and installing the command line tools from apple, I see the following error whenever I run brew:

```
$ brew install --debug zsh
Error: No such file or directory - /Users/chaines/Error:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb:434:in `lstat'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb:434:in `realpath_rec'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb:467:in `realpath'
/usr/local/Library/Homebrew/utils.rb:272:in `default_cc'
/usr/local/Library/Homebrew/utils.rb:276:in `default_compiler'
/usr/local/Library/Homebrew/extend/ENV.rb:360:in `compiler'
/usr/local/Library/Homebrew/extend/ENV.rb:26:in `setup_build_environment'
/usr/local/Library/Homebrew/build.rb:23
/usr/local/Library/Formula/zsh.rb:25
```

I took a look at the ruby code running here and it looks like it is failing to understand the output of:

```
$ xcrun -find cc
xcode-select: Error: No Xcode folder is set. Run xcode-select -switch to set the path to the Xcode folder.
Error: /usr/bin/xcode-select returned unexpected error.
```

which it runs in `/usr/local/Library/Homebrew/utils.rb` line 270 or whereabouts.

I do have `cc` and friends:

```
$ which cc
/usr/bin/cc
```