【问题标题】:How to soIve IoTDB compile error with iotdb-client-go?如何使用 iotdb-client-go 解决 IoTDB 编译错误?
【发布时间】:2021-11-17 02:36:55
【问题描述】:

无法构建文件 session_example.go。错误信息是

go build session_exmaple.go
github.com/apache/iotdb-client-go/rpc
/root/go/src/github.com/apache/iotdb-client-go/rpc/rpc.go:106:36: not enough arguments in call to iprot.ReadStructBegin
have ()
want (context.Context)
/root/go/src/github.com/apache/iotdb-client-go/rpc/rpc.go:114:55: not enough arguments in call to iprot.ReadFieldBegin
have ()
want (context.Context)
/root/go/src/github.com/apache/iotdb-client-go/rpc/rpc.go:198:32: too many errors

thrift的接口TProtocol的功能不匹配。可能还有其他无法打印的错误。

【问题讨论】:

    标签: database apache-iotdb iotdb


    【解决方案1】:

    您可以查看 thrift 的 0.13.0 或更高版本。 如果没有 go mod,你可以尝试如下:

    # get thrift 0.13.0
    go get github.com/apache/thrift
    cd $GOPATH/src/github.com/apache/thrift
    git checkout 0.13.0
    
    mkdir -p $GOPATH/src/iotdb-client-go-example/session_example
    cd $GOPATH/src/iotdb-client-go-example/session_example
    
    curl -o session_example.go -L https://github.com/apache/iotdb-client-go/raw/main/example/session_example.go
    go run session_example.go
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-13
      • 1970-01-01
      • 2021-11-26
      • 2021-12-25
      • 2022-06-12
      • 2013-03-17
      • 1970-01-01
      • 2022-12-08
      相关资源
      最近更新 更多