1

I'm trying to install librdkafka on Mac Monterey:

https://github.com/edenhill/librdkafka

It says:

brew install librdkafka

However, I'm getting compiler errors indicating it's missing. Upon taking a look i was expecting it to install in /usr/local/lib but it's not there.

When I do:

find . -name "*kafka*"

I'm still not finding it (or at least nothing which looks like it).

If I try running brew again I get:

Warning: librdkafka 1.8.2 is already installed and up-to-date.
To reinstall 1.8.2, run:
  brew reinstall librdkafka
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
intrigued_66
  • 16,082
  • 51
  • 118
  • 189

1 Answers1

0

By default, Homebrew should be using /usr/local/Cellar

$ brew install librdkafka
Warning: librdkafka 1.8.2 is already installed and up-to-date.
To reinstall 1.8.2, run:
  brew reinstall librdkafka
$ brew info librdkafka
librdkafka: stable 1.8.2 (bottled), HEAD
Apache Kafka C/C++ library
https://github.com/edenhill/librdkafka
/usr/local/Cellar/librdkafka/1.8.2 (36 files, 4.8MB) *
  Poured from bottle on 2021-10-22 at 12:56:59
$ tree /usr/local/Cellar/librdkafka/1.8.2/lib/
/usr/local/Cellar/librdkafka/1.8.2/lib/
├── librdkafka++.1.dylib
├── librdkafka++.a
├── librdkafka++.dylib -> librdkafka++.1.dylib
├── librdkafka.1.dylib
├── librdkafka.a
├── librdkafka.dylib -> librdkafka.1.dylib
└── pkgconfig
    ├── rdkafka++-static.pc
    ├── rdkafka++.pc
    ├── rdkafka-static.pc
    └── rdkafka.pc

1 directory, 10 files

I'm getting compiler errors indicating it's missing

I suspect these errors say something else is missing 

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • Hi, thanks. for replying. The compiler error was "fatal error: 'librdkafka/rdkafka.h' file not found". I've found librdkafka in /opt/homebrew/Cellar/librdkafka/1.8.2/. Given this compiles fine for my colleagues, I assume my installation has gone to the wrong path? – intrigued_66 Jan 26 '22 at 00:21
  • Does this mean an environment variable is causing my installations to go to /opt/homebrew/ instead of /usr/local and what would this variable be for me to check? – intrigued_66 Jan 26 '22 at 00:31
  • 2
    Ah, I think it's because I have an M1 processor and Homebrew (Apple) has a different installation path to Homebrew (Intel) but if you could confirm this would explain it? – intrigued_66 Jan 26 '22 at 01:11
  • That makes sense to me! I don't have access to an M1 Mac to compare against. Maybe using Rosetta terminal would solve things for you? And yes, there's some environment variable for the Homebrew path, but I cannot recall it right now – OneCricketeer Jan 26 '22 at 05:02