我正在尝试像这样安装 doozer :
$ goinstall github.com/ha/doozer
我收到这些错误。
goinstall: os: go/build: package could not be found locally goinstall: fmt: go/build: package could not be found locally goinstall: io: go/build: package could not be found locally goinstall: reflect: go/build: package could not be found locally goinstall: math: go/build: package could not be found locally goinstall: rand: go/build: package could not be found locally goinstall: url: go/build: package could not be found locally goinstall: net: go/build: package could not be found locally goinstall: sync: go/build: package could not be found locally goinstall: runtime: go/build: package could not be found locally goinstall: strings: go/build: package could not be found locally goinstall: sort: go/build: package could not be found locally goinstall: strconv: go/build: package could not be found locally goinstall: bytes: go/build: package could not be found locally goinstall: log: go/build: package could not be found locally goinstall: encoding/binary: go/build: package could not be found locally
原文由 jshen 发布,翻译遵循 CC BY-SA 4.0 许可协议
GOPATH
在cmd/go
文档 中讨论:GOROOT
在 安装说明 中讨论:( Chris Bunch 回答的 更新版本。)