windows - 如何在 Windows 上安装 go-sql-driver

标签 windows git go

我正在尝试安装 go-sql-driver在 Windows Vista 上,但我在使用 GOPATH 时遇到问题。

我按照建议安装了 git,并将 GOPATH 添加为 Windows 中的新用户环境,路径为 C:/users/A/desktop/go

我在命令行中运行了 go get github.com/go-sql-driver/mysql 但它给了我这个错误:

C:\>go get github.com/go-sql-driver/mysql
go: missing Git command. See http://golang.org/s/gogetcmd
package github.com/go-sql-driver/mysql: exec: "git": executable file not found in %PATH%

当我去看看http://golang.org/s/gogetcmd它只是说下载 git。但是它已经下载到我的机器上了。

我还继续为 PATH 创建了一个新的环境变量,并将其路径设置为安装 git 的目录,但这也没有帮助。

我做错了什么?

最佳答案

http://git-scm.com/downloads 下载 Windows 版本的 Git。

运行下载的可执行文件,当前为 Git-1.8.3-preview20130601.exe,它将启动 Git 安装向导以安装 Git。

检查 Git 设置选项

  • 从 Windows 命令提示符运行 Git
  • 按原样检查,提交 Unix 风格的行结尾

通过运行检查安装:

C:\>git --version
git version 1.8.3.msysgit.0

关于windows - 如何在 Windows 上安装 go-sql-driver,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17517085/

相关文章:

c# - UWP ValueConverter 返回 System._COMObject

go - 如果客户端在10秒内没有响应,如何通过超时关闭连接?

IIS 上的 PHP-CGI.exe 崩溃

c - 如何从 Windows 文件过滤器驱动程序中的路径中删除文件名?

git - 添加本地存储库 Github Desktop 整个用户文件

linux - 如何仅还原特定文件中的特定行?

git 搁置到远程仓库

go - 我想知道这段代码中的模式和逻辑

go - 如何在golang中使用空格距离进行输入

python - 错误系统调用spawn C :\Windows\system32\cmd. exe