在使用confluent-kafka-go 時遇到以下問題

問題

$ go build t.go
# pkg-config --cflags rdkafka
Package rdkafka was not found in the pkg-config search path.
Perhaps you should add the directory containing `rdkafka.pc'
to the PKG_CONFIG_PATH environment variable
No package 'rdkafka' found
pkg-config: exit status 1

解決辦法:

*** 文件~/.bashrc 末尾添加 ***bash

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/

#source ~/.bashrc
相關文章
相關標籤/搜索