我是go lang的新手.尝试使用“go get”命令导入go库但在cmd中收到此错误:
- go: missing Git command. See https://golang.org/s/gogetcmd
- package github.com/ttacon/chalk: exec: "git": executable file not found in %PATH%
我的环境:
- set GOARCH=amd64
- set GOBIN=
- set GOEXE=.exe
- set GOHOSTARCH=amd64
- set GOHOSTOS=windows
- set GOOS=windows
- set GOPATH=F:\Works\Go
- set GORACE=
- set GOROOT=C:\Go
- set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
- set GO15VENDOREXPERIMENT=1
- set CC=gcc
- set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
- set CXX=g++
- set CGO_ENABLED=1
我的Go环境出了什么问题?
如果任何软件包从git存储库中存在(并且正在获取),则go get需要git.对于Windows,您可以从
git website安装git.