-1

I want to use command go get,but it throws an exception

enter image description here

But i had installed the command line tools.

enter image description here

system:macOs sierra 10.12.6

go:1.9.2

EDIT: Error messages:

go get github.com/hashicorp/go-plugin
# cd .; git clone https://github.com/hashicorp/go-plugin 
/Users/famoss/files/goworkspace/src/github.com/hashicorp/go-plugin xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
package github.com/hashicorp/go-plugin: exit status 1
2
  • 1
    You don't need to use sudo. Also please add error messages as text, not as screenshot.
    – tkausl
    Commented Oct 28, 2017 at 3:16
  • @tkausl sorry,i edited the content.
    – Baby.zhou
    Commented Oct 28, 2017 at 3:19

1 Answer 1

2

Try one of the recommendations of this question:

  • either select the XCode version you want to use (directly in XCode Preferences)
  • or try the suggested sudo xcode-select --switch path/to/Xcode.app
  • or try a sudo xcode-select --reset

See also "git push xcrun: error: active developer path does not exist" for an alternative approach.

Not the answer you're looking for? Browse other questions tagged or ask your own question.