How can I resolve "Error: No developer directory found at /Developer"?

XcodeMacosXcodebuild

Xcode Problem Overview


I just upgraded XCode to 4.3.1. I'm using a script to build (and then deploy through Testflight) my app. But I now receive this error:

> Error: No developer directory found at /Developer. Run /usr/bin/xcode-select to update the developer directory path.

I've no /Developer dir in my machine: how can I fix it?

Xcode Solutions


Solution 1 - Xcode

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

Solution 2 - Xcode

You could also do this instead ...

sudo ln -s /Applications/Xcode.app/Contents/Developer /Developer

Solution 3 - Xcode

Everything you guys answered is correct. But for those who hit the following error are missing a step:

Error:

  "xcode-select: Error: Path "/Applications/Xcode.app/Contents/Developer" is not a directory."

Missing step:

Double click your xcode 432.dmg. Now don't double click the xcode.app to use it. Instead copy it /Applications folder and then open it from there to install xcode.

Now use terminal command

 sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

Thats it. Your error won't happen again and Filemerge will work now.

Solution 4 - Xcode

This solved for me:

Mostly this error occurs when you have installed a newer version of xcode. And the command line tools are yet to be initialized.

To resolve this: Go under Xcode Preferences > Locations (tab) > And the bottom options is Command Line Tools. Please select the Xcode version for tools.

Example (For Xcode 8.3.3): Go under Xcode Preferences > Locations (tab) > And the bottom options is Command Line Tools. Select Xcode 8.3.3 (7D1014).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionGiordano ScalzoView Question on Stackoverflow
Solution 1 - XcodeJimView Answer on Stackoverflow
Solution 2 - XcodeJeremyView Answer on Stackoverflow
Solution 3 - XcodeDeepukjayanView Answer on Stackoverflow
Solution 4 - XcodeSamman Bikram ThapaView Answer on Stackoverflow