Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcode-select --install xcode-select: Error: unknown command option '--install'

i am trying to install Command line tools on Xcode from terminal.I am using Xcode

Version 5.1.1 (5B1008). I have installed command line tools within Xcode,enter image description here

Now if i try to install Command Line tools in terminal i get thisenter image description here

How to solve this ? xcode-select version 2311.I tried the following things

1.my path is /Applications/Xcode.app/Contents/Developer,so i switched like this

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

Nothing happened i get same error command not found.

2.I followed this link but was not useful xcrun: Error: could not stat active Xcode path '/Volumes/Xcode/Xcode45-DP1.app/Contents/Developer'. (No such file or directory)

Any thoughts are welcome

like image 784
Suraj K Thomas Avatar asked Dec 02 '22 16:12

Suraj K Thomas


2 Answers

This same problem stumped me for over an hour when setting up a new MacBook Pro with the latest version of High Sierra.

The solution - curiously - was that:

  • copying & pasting "xcode-select --install" failed continually, but
  • typing in the same command "xcode-select --install" worked immediately.

(Someone else may understand why pasting a simple line of code did not produce the same result as entering it from the keyboard.)

like image 180
TechnoCat Avatar answered Dec 07 '22 00:12

TechnoCat


i figured out.The problem was i was using outdated version of mavericks,i updated to the latest version and everything was working.First step is to make sure your version is up to date

like image 41
Suraj K Thomas Avatar answered Dec 07 '22 01:12

Suraj K Thomas