5

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

Community
  • 1
  • 1
Suraj K Thomas
  • 5,773
  • 4
  • 52
  • 64
  • 1
    If you have installed the command line tools from Xcode you don't need to bother from Terminal.app. – trojanfoe Jul 09 '14 at 10:52
  • 1
    ok.but i am trying to install Macports from terminal,where i need command line tool to install some stuff,is that ok ?what do u think? – Suraj K Thomas Jul 09 '14 at 10:58

2 Answers2

22

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.)

TechnoCat
  • 667
  • 8
  • 16
1

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

Suraj K Thomas
  • 5,773
  • 4
  • 52
  • 64