草庐IT

go get -> 无法下载,/home/azhukov/go 是 GOROOT,不是 GOPATH

美好的一天!我正在尝试在GoogleCloud中安装gb(go的vendor工具)。我尝试goget但失败了:azhukov@gce-machine:~$goget-vgithub.com/constabulary/gb/...packagegithub.com/pkg/errors:cannotdownload,/home/azhukov/goisaGOROOT,notaGOPATH.Formoredetailssee:'gohelpgopath'这是环境:azhukov@gce-machine:~$echo$GOPATH,$GOROOT,$PATH/home/azhukov/go,

go get -> 无法下载,/home/azhukov/go 是 GOROOT,不是 GOPATH

美好的一天!我正在尝试在GoogleCloud中安装gb(go的vendor工具)。我尝试goget但失败了:azhukov@gce-machine:~$goget-vgithub.com/constabulary/gb/...packagegithub.com/pkg/errors:cannotdownload,/home/azhukov/goisaGOROOT,notaGOPATH.Formoredetailssee:'gohelpgopath'这是环境:azhukov@gce-machine:~$echo$GOPATH,$GOROOT,$PATH/home/azhukov/go,

go - 无法从 $GOROOT 和 $GOPATH 中找到包

我在尝试运行gobuild命令后遇到的一小部分错误gobuild./...trillian.pb.go:7:8:cannotfindpackage"github.com/golang/protobuf/proto"inanyof:/usr/local/go/src/github.com/golang/protobuf/proto(from$GOROOT)/Projects/Proj1/trillian/src/github.com/golang/protobuf/proto(from$GOPATH)trillian.pb.go:11:8:cannotfindpackage"github

go - 无法从 $GOROOT 和 $GOPATH 中找到包

我在尝试运行gobuild命令后遇到的一小部分错误gobuild./...trillian.pb.go:7:8:cannotfindpackage"github.com/golang/protobuf/proto"inanyof:/usr/local/go/src/github.com/golang/protobuf/proto(from$GOROOT)/Projects/Proj1/trillian/src/github.com/golang/protobuf/proto(from$GOPATH)trillian.pb.go:11:8:cannotfindpackage"github

go - (来自 $GOROOT) ($GOPATH not set) in IntelliJ idea

我已经开始在IntelliJIdea中使用golang。我有以下代码主要包import("fmt""/github.com/zzz/stringutil")funcmain(){fmt.Printf(stringutil.Reverse("!oG,olleH"))}我还有以下stringutil.go文件//Packagestringutilcontainsutilityfunctionsforworkingwithstrings.packagestringutil//Reversereturnsitsargumentstringreversedrune-wiselefttoright

go - (来自 $GOROOT) ($GOPATH not set) in IntelliJ idea

我已经开始在IntelliJIdea中使用golang。我有以下代码主要包import("fmt""/github.com/zzz/stringutil")funcmain(){fmt.Printf(stringutil.Reverse("!oG,olleH"))}我还有以下stringutil.go文件//Packagestringutilcontainsutilityfunctionsforworkingwithstrings.packagestringutil//Reversereturnsitsargumentstringreversedrune-wiselefttoright

go: 找不到 GOROOT 目录: C:\Go; C:\Go\bin

如标题所示,我只是在我的笔记本电脑上安装了Go包。操作系统:Windows7企业版SP1(64位)安装路径:C:\go我已经设置了“环境变量”:GOROOTValue=C:\GO;C:GO\bin我制作了hello.go文件并将其保存在C:\go当我在C:\中的CMD中运行"gorunhello.go"时,得到如下错误信息:go:cannotfindcannotfindGOROOTdirectory:C:\Go;C:\Go\bin 最佳答案 GOROOT应该设置为d:/programs/go如果你在那里安装它。GOPATH应该设置为

go: 找不到 GOROOT 目录: C:\Go; C:\Go\bin

如标题所示,我只是在我的笔记本电脑上安装了Go包。操作系统:Windows7企业版SP1(64位)安装路径:C:\go我已经设置了“环境变量”:GOROOTValue=C:\GO;C:GO\bin我制作了hello.go文件并将其保存在C:\go当我在C:\中的CMD中运行"gorunhello.go"时,得到如下错误信息:go:cannotfindcannotfindGOROOTdirectory:C:\Go;C:\Go\bin 最佳答案 GOROOT应该设置为d:/programs/go如果你在那里安装它。GOPATH应该设置为

go - GOPATH 和 GOROOT 的值应该是多少?

我正在尝试安装doozer像这样:$goinstallgithub.com/ha/doozer我收到这些错误。goinstall:os:go/build:packagecouldnotbefoundlocallygoinstall:fmt:go/build:packagecouldnotbefoundlocallygoinstall:io:go/build:packagecouldnotbefoundlocallygoinstall:reflect:go/build:packagecouldnotbefoundlocallygoinstall:math:go/build:package

Go get path 是 GOROOT,而不是 GOPATH 错误,即使在 Windows 中设置了 env

在Windows8中,每当我尝试使用goget和goinstall下载包时,我都会收到以下错误:cannotdownload,C:\Users\MYUSER\goisaGOROOT,notaGOPATH.Formoredetailssee:'gohelpgopath'我为计算机和当前用户手动设置了环境变量GOPATH、GOROOT和GOTOOLDIR,但无济于事用户去环境setGOARCH=amd64setGOBIN=setGOEXE=.exesetGOHOSTARCH=amd64setGOHOSTOS=windowssetGOOS=windowssetGOPATH=C:\Users\