1,Git clone
git clone https://github.com/edenhill/librdkafka.git
2,cd librdkafka/
3,./configure
4,make
5,sudo make install
最后链接lib库:
-lrdkafka++
other
Link your program with -lrdkafka -lz -lpthread -lrt
.
参考连接:https://github.com/edenhill/librdkafka