2

sudo xcode-select -switch /Applications/Xcode.app command not working, I have a OS Sierra and Xcode 8 installed. I either get no reply and command moves to next line or i get an error. Please Help i want to change directory

1
  • (To make literal text stand out, you can put it between "backticks" ``.) xcode-select looks funny - shouldn't the be a blank space before the dash? Commented Aug 5, 2017 at 14:44

2 Answers 2

1

You need to run xcode-select as root. Therefore, simply execute the following command in Terminal:

sudo xcode-select -s "/Applications/Xcode.app"

Sign up to request clarification or add additional context in comments.

4 Comments

True that. My bad.
Ive tried that too, it still just goes to the next line without performing any function.
Im learning an online course on objective c and the same function the instructor performs on his mac does not work on my mac, please help with other suggestions if possible
Well, just a thought: If you just want to switch the Xcode command line toolchain you can also do that in Xcode directly. Go to Xcode -> Preferences -> Locations and select your toolchain via Command Line Tools.
1

Check your setting for DEVELOPER_DIR environment variable. You may be over-riding it. Find out with:

echo $DEVELOPER_DIR

In your ~/.bash_profile add:

export DEVELOPER_DIR=/Applications/Xcode.app

Found the answer in https://forums.developer.apple.com/thread/13629

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.