5

Today I tried to use opendiff on my MacBook Pro and I got this error.

xcode-select: Error: No Xcode folder is set. Run xcode-select -switch <xcode_folder_path> to set the path to the Xcode folder.
Error: /usr/bin/xcode-select returned unexpected error.

Do you have any idea why it suddenly start happening and how to fix it?

dandan78
  • 13,328
  • 13
  • 64
  • 78
Chris Cinelli
  • 4,679
  • 4
  • 28
  • 40

3 Answers3

20

That is because with 4.3 /Developer/ moved to /Applications/Xcode.app/Contents/Developer/

The proper setting for the new path is:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/
the Tin Man
  • 158,662
  • 42
  • 215
  • 303
valexa
  • 4,462
  • 32
  • 48
2

Fixed with:

sudo xcode-select -switch /Developer/

I am still unsure why I stopped working though.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Chris Cinelli
  • 4,679
  • 4
  • 28
  • 40
1
sudo xcode-select -switch /Developer/ 

worked for me

-- I use Versions with FileMerge and started seeing the same error code immediately after upgrading to OSX 10.7.3

Wade Williams
  • 3,943
  • 1
  • 26
  • 35