Go路径和设置

huangapple go评论72阅读模式
英文:

Go path and setup

问题

我安装了适用于 Windows 64 位的 Go 二进制文件,并设置了 Go 路径,如下图所示:

Go路径和设置

我还从 Git 上下载了它。为什么它找不到 go 命令呢?

英文:

I installed go binary for windows 64 and set up Go Paths like

Go路径和设置

I also downloaded it from git. Why wont it find the go command?

答案1

得分: 1

我也从git上下载了它。

Go仓库(github.com/golang/go)不会包含go二进制文件。
只有golang.org/dl/上的msi或存档文件(例如go1.4.1.windows-amd64.zip)才会包含。

你可以将存档文件解压到任何位置,并将GOROOT设置为该位置,%GOROOT%\bin将指向go二进制文件。

英文:

> I also downloaded it from git

The Go repo (github.com/golang/go) wouldn't include the go binary.
Only the msi or the archive at golang.org/dl/ would (like go1.4.1.windows-amd64.zip) would.

You can unzip the archive anywhere, and set GOROOT to it, and %GOROOT%\bin will point the the go binary.

答案2

得分: 1

在用户变量下添加:
GOPATH: C/:go

在系统变量下添加:
C:/go

英文:

Add under user variables:
GOPATH: C/:go

Add under systems variable:
C:/go

huangapple
  • 本文由 发表于 2015年1月27日 11:08:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/28162577.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定