大家好,我正尝试'$ go get github.com/gocql/gocql'安装在Ubuntu AWS盒子上。任何建议都非常感谢。

我以[email protected]登录

一般文件结构是

/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。我觉得我好笨 :( -

08-25 19:06