golang go get出现"go: missing Git command"异常

前端之家收集整理的这篇文章主要介绍了golang go get出现"go: missing Git command"异常前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

今天在windows下面go get一个github上的第三方库时出现异常(也是第一次在windows下面使用go get)

如下:

>go get github.com/seefan/gossdb

出现如下错误:

go: missing Git command. See http://golang.org/s/gogetcmd package github.com/seefan/gossdb: exec: "git": executable file not found in %PATH%

原来是没有在环境变量PATH中配置git的bin路径

解决办法:
在环境变量PATH后面添加上git安装的bin目录路径即可

;C:\Program Files\Git\bin

PS: 每个PATH环境变量值用”;”分割
参考: http://www.xuebuyuan.com/2177071.html

原文链接:https://www.f2er.com/go/190476.html

猜你在找的Go相关文章