gpt4 book ai didi

go - 安装gocql报错

转载 作者:数据小太阳 更新时间:2023-10-29 03:37:38 26 4
gpt4 key购买 nike

大家好,我正在尝试“$ go get github.com/gocql/gocql”以在 Ubuntu AWS 机器上安装。非常感谢任何建议。

我以 ubuntu@some.ip.adre.ss 身份登录

一般的文件结构是

/home/ubuntu
/home/ubuntu/go
/home/ubuntu/cassandra

-

$ go get github.com/gocql/gocql
# github.com/gocql/gocql
src/github.com/gocql/gocql/conn.go:137:19: error: reference to undefined identifier ‘tls.DialWithDialer’
conn, err = tls.DialWithDialer(dialer, "tcp", addr, cfg.tlsConfig)
^
src/github.com/gocql/gocql/frame.go:242:23: error: reference to undefined identifier ‘sync.Pool’
var framerPool = sync.Pool{
^
src/github.com/gocql/gocql/frame.go:242:27: error: expected ‘;’ or newline after top level declaration
var framerPool = sync.Pool{
^
src/github.com/gocql/gocql/frame.go:248:2: error: expected declaration
},
^

我的 golang 设置是...

$ go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ubuntu/go"
GORACE=""
GOROOT="/usr"
GOTOOLDIR="/usr/pkg/tool/linux_amd64"
TERM="dumb"
CC="gcc"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread"
CXX="g++"
CGO_ENABLED="1"

我的 Java 详细信息是:

$ java -version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)

Cassandra :

home/ubuntu/cassandra/bin$ ./cqlsh
Connected to Test Cluster at localhost:9160.
[cqlsh 4.1.1 | Cassandra 2.0.16 | CQL spec 3.1.1 | Thrift protocol 19.39.0]
Use HELP for help.
cqlsh>

最佳答案

解决了问题...我使用的是旧版本的 Go。我觉得自己很愚蠢:( –

关于go - 安装gocql报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32019700/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com