去:无法找到GOROOT目录:C:\ GO; C:\Go\bin [英] go: cannot find GOROOT directory: C:\Go; C:\Go\bin
问题描述
操作系统:Windows 7 Enterpreise SP1(64位)
安装路径:
C:\go
我设置了环境变量:
GOROOT
Value = C:\GO; C :GO \bin
我制作了hello.go文件并保存在 C:\go
当我运行go run hello.goin CMD in C:\ ,得到如下错误信息:
go:无法找到GOROOT目录:C:\\ \\走; C:\ Go\bin
GOROOT
应该设置为 d:/ programs / go
,如果您在那里安装它。
GOPATH
应该设置为 d:/ workspace / gopath
,如果您想要它。
另外, code> d:\programs\go\bin 应该最好添加到PATH中。
接受斜杠(/)而不是反斜杠(\)。但是,当然,对于PATH,它应该是反斜杠(\)。
As title, I just install Go package in my laptop.
OS:Windows 7 Enterpreise SP1 (64bit)
Install path: C:\go
I've set "Environment Variables":
GOROOT
Value = C:\GO;C:GO\bin
I made hello.go file and save it in C:\go
When I run "go run hello.go" in CMD in C:\
, get error message as below:
go:cannot find cannot find GOROOT directory: C:\Go; C:\Go\bin
GOROOT
should be set to d:/programs/go
if you installed it there.
GOPATH
should be set to d:/workspace/gopath
if you want it there.
Also, d:\programs\go\bin
should preferably be added to PATH.
It seems like Go only accepts slash (/) and not backslash (\). But of course, for PATH, it should be backslash (\).
这篇关于去:无法找到GOROOT目录:C:\ GO; C:\Go\bin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!