英文:
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 (
_ "github.com/go-sql-driver/mysql"
)
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论