'xcrun can't find Xcode path
Mac OS X 10.8.2
Xcode 4.5.2 (installed at /Applications/Xcode.app)
Triedxcode-select -switch /Applications/Xcode.app
After thatxcode-select -print-path
outputs correct path (/Applications/Xcode.app). Butxcrun -find gcc
fails with error
xcrun: Error: could not stat active Xcode path '/Developer/Xcode.app/Contents/Developer'. (No such file or directory).
Update 1:
Here are permission specifiers
ls -l /Applications/Xcode.app
total 0
drwxr-xr-x@ 16 my admin 544 Oct 30 23:38 Contents
ls -l /Applications/Xcode.app/Contents
total 24
drwxr-xr-x@ 8 my admin 272 Oct 30 23:30 Applications
drwxr-xr-x@ 9 my admin 306 Oct 30 23:36 Developer
drwxr-xr-x@ 5 my admin 170 Oct 30 23:30 Frameworks
-rw-r--r--@ 1 my admin 15289 Oct 19 14:22 Info.plist
drwxr-xr-x@ 3 my admin 102 Aug 5 08:03 Library
drwxr-xr-x@ 3 my admin 102 Oct 30 23:10 MacOS
drwxr-xr-x@ 16 my admin 544 Oct 30 23:37 OtherFrameworks
-rw-r--r--@ 1 my admin 8 Oct 19 14:22 PkgInfo
drwxr-xr-x@ 56 my admin 1904 Oct 30 23:36 PlugIns
drwxr-xr-x@ 52 my admin 1768 Oct 30 23:46 Resources
drwxr-xr-x@ 17 my admin 578 Oct 30 23:46 SharedFrameworks
drwxr-xr-x@ 4 my admin 136 Oct 17 21:50 XPCServices
drwxr-xr-x@ 3 my admin 102 Oct 30 23:10 _CodeSignature
-rw-r--r--@ 1 my admin 523 Oct 30 23:10 version.plist
ls -l /Applications/Xcode.app/Contents/Developer
total 0
drwxr-xr-x@ 3 my admin 102 Aug 5 07:29 Documentation
drwxr-xr-x@ 7 my admin 238 Dec 20 21:09 Library
drwxr-xr-x@ 7 my admin 238 Oct 30 23:46 Makefiles
drwxr-xr-x@ 5 my admin 170 Oct 30 23:28 Platforms
drwxr-xr-x@ 3 my admin 102 Oct 10 01:37 Toolchains
drwxr-xr-x@ 22 my admin 748 Oct 30 23:31 Tools
drwxr-xr-x@ 7 my admin 238 Oct 30 23:46 usr
Please help.
Solution 1:[1]
Run this to set your Developer folder:
sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer
Solution 2:[2]
Open Xcode > Preferences > Locations > Select your Xcode version from the dropdown and exit Xcode ref
Solution 3:[3]
I have tried all the possible options:
- Re-installing Xcode
- Changed all sort of paths
- re-installed developer tools
- I even re-installed the operating system!
Downloading the latest GIT version from Here did the trick though.
I believe it's an error from upgrading the operating system. I think a clean/format reinstall would have fixed it as well (since all the settings are being kept)
Please note: Restart the current Terminal window & This is not a temporary solution.
Solution 4:[4]
Do the following steps
Open Xcode
Preferences->Locations->Command Line Tools-> Select Xcode Version
Solution 5:[5]
Add the following line to '~/.bashrc' file:
export DEVELOPER_DIR=”/Applications/XCode.app/Contents/Developer”
run source ~/.bashrc , and restart terminal.
Solution 6:[6]
sudo xcode-select --switch path/to/Xcode.app
Worked in my case.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nanda |
| Solution 2 | Fawaz |
| Solution 3 | Dani |
| Solution 4 | Community |
| Solution 5 | wj2061 |
| Solution 6 | nik |
