Golang go-sql-driver/mysql.a 可以翻译为 “Golang go-sql-driver/mysql.a”。

huangapple go评论73阅读模式
英文:

Golang go-sql-driver/mysql.a

问题

我正在使用CentOS6.6服务器上的"github.com/go-sql-driver/mysql"库。并导入该库:

import (
    _ "github.com/go-sql-driver/mysql"
)

构建代码:

go build index.go

然而,出现了一个错误:

import /usr/local/go/pkg/linux_amd64/github.com/go-sql-driver/mysql.a: object is [darwin amd64 go1.4.2 X:precisestack] expected [linux amd64 go1.4 X:precisestack]

我不知道这个错误的含义。

请告诉我如何解决这个问题。

英文:

I'm using "github.com/go-sql-driver/mysql" library on CentOS6.6 server.<br>
And import the library:

import (
    _ &quot;github.com/go-sql-driver/mysql&quot;
)

Building

go build index.go

However, an error occurred.

> import /usr/local/go/pkg/linux_amd64/github.com/go-sql-driver/mysql.a: object is [darwin amd64 go1.4.2 X:precisestack] expected [linux amd64 go1.4 X:precisestack]

I don't know what this error says.

Please tell me how to solve this problem.

答案1

得分: 2

根据这里所说,对于这种错误,通常删除pkg文件夹可以解决问题。

英文:

As said here, with this kind of error, deleting the pkg folder often helps

huangapple
  • 本文由 发表于 2015年9月13日 13:14:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/32546541.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定