【发布时间】:2011-12-19 16:49:57
【问题描述】:
我正在尝试像这样安装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
【问题讨论】:
-
@Motin 上述链接已失效
-
该文件已过时,无法用于该项目。在这里可以找到与 OSX 相关的问题:github.com/go-lang-plugin-org/go-lang-idea-plugin/issues/841
-
注意:默认情况下,
GOPATH将在 Go 1.8 (2017) 中为您设置。见my answer below -
使用 Go 1.9(2017 年第三季度),您无需再担心
GOROOT。见my answer below。 -
@BenyaminJafari 因为
goinstall是非常古老的 Go1 之前的版本,自 2012 年以来就不存在了。