dongnu4254
dongnu4254
采纳率100%
2019-03-22 10:32

安装Golang Kafka客户端(融合)时出现错误消息

已采纳

I want to ask about my problem in installing confluent golang kafka client on Mac OS Mojave.

Why is there always error message while installing golang kafka client go get -u github.com/confluentinc/confluent-kafka-go/kafka even the librdkafka already installed?

The error message:

$GOPATH/src/github.com/confluentinc/confluent-kafka-go/kafka/event.go:234:9: could not determine kind of name for C.RD_KAFKA_RESP_ERR__FATAL
$GOPATH/src/github.com/confluentinc/confluent-kafka-go/kafka/event.go:242:18: could not determine kind of name for C.rd_kafka_fatal_error

The librdkafka is already installed librdkafka 0.11.6 already installed.

The pkg-config version already 0.29.2.

What should i do to fix this issue?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • douqipi9704 douqipi9704 2年前

    Seems like an issue with the confluent-kafka-go package on master branch.

    If you use go modules and you bind the version to 0.11.6 it works.

    go 1.12:

    go get -u github.com/confluentinc/confluent-kafka-go/kafka@v0.11.6
    

    go 1.11:

    GO111MODULE=on go get -u github.com/confluentinc/confluent-kafka-go/kafka@v0.11.6
    

    If you don't have go modules, clone the package under the correct go path and checkout to tag v0.11.6.

    点赞 评论 复制链接分享

相关推荐