dougu1896 2013-07-07 22:37
浏览 212
已采纳

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

I am trying to install go-sql-driver on Windows Vista but I am having problems with GOPATH.

I installed git as suggested and added GOPATH as a new user environment in Windows with path C:/users/A/desktop/go.

I ran go get github.com/go-sql-driver/mysql in the command line but it gives me this error:

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%

When I go look at http://golang.org/s/gogetcmd it merely says download git. But it is already downloaded in my machine.

I also went ahead and created a new environement variable for PATH and set its path to the directory where git was installed but that did not help either.

What am I doing wrong?

  • 写回答

3条回答 默认 最新

  • doutao6380 2013-07-08 00:05
    关注

    Download the Windows version of Git from http://git-scm.com/downloads.

    Run the downloaded executable file, currently Git-1.8.3-preview20130601.exe, which will start a Git Setup wizard to install Git.

    Check Git Setup Options

    • Run Git from the Windows Command Prompt
    • Checkout as-is, commit Unix-style line endings

    Check the installation by running:

    C:\>git --version
    git version 1.8.3.msysgit.0
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?