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条)

报告相同问题?

悬赏问题

  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)
  • ¥20 matlab yalmip kkt 双层优化问题