Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MacOS throwing dyld Error when running kafkacat

I want to use kafkacat command line utility(https://docs.confluent.io/current/app-development/kafkacat-usage.html) on my MacOS Mojave(10.14.5). I executed the below steps

brew install kafkacat

kafkacat -C -b brokerID -t kafkaTopic -e -K '+'

I am getting the error as below

dyld: lazy symbol binding failed: Symbol not found: _timespec_get
Referenced from: /usr/local/opt/librdkafka/lib/librdkafka.1.dylib
Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _timespec_get Referenced from: /usr/local/opt/librdkafka/lib/librdkafka.1.dylib Expected in: /usr/lib/libSystem.B.dylib

Abort trap: 6

I've tried uninstalling and reinstalling kafkacat.

like image 839
Sujan Davangere Sunil Avatar asked Mar 03 '23 07:03

Sujan Davangere Sunil


1 Answers

I ran into the same issue. Looks like it is coming from librdkafka: https://github.com/edenhill/librdkafka/pull/2569 and the last version of Xcode (11). You can either:

  • Uninstall librdkafka / kafkacat brew version (brew uninstall ...). Rebuild librdkafka using the "fixed" branch and then rebuild kafkacat (method I tested) OR
  • Downgrade Xcode to 10.x
like image 60
a.b.d Avatar answered Mar 09 '23 07:03

a.b.d