我想使用命令go get
,但它抛出异常
但我已经安装了命令行工具。
系统:macOs sierra 10.12.6
Go:1.9.2
编辑: 错误信息:
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
最佳答案
尝试 this question 的建议之一:
- 选择您要使用的 XCode 版本(直接在 XCode 首选项中)
- 或尝试建议的
sudo xcode-select --switch path/to/Xcode.app
- 或尝试
sudo xcode-select --reset
另请参阅“git push xcrun: error: active developer path does not exist”以了解替代方法。
关于macos - 无法在 mac os 上使用 Go 命令行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46985880/