2

I'm on Mac Monterey (Apple cpu) and I've installed librdkafka:

https://github.com/edenhill/librdkafka

using homebrew. It has installed to /opt/homebrew/Cellar/librdkafka/

However, online sources suggest the default installation path on ARM (which Apple M1 is?) should be /usr/local/Cellar

Because of this I get compiler errors that our makefile/compilation cannot find the librdkafka header. I assume Homebrew should have installed to /usr/local/Cellar?

What has caused this problem/how can i fix the default installation path and how can I fix the librdkafka installation path?

1 Answer 1

4

Homebrew uses different destination folders for different architectures (see https://docs.brew.sh/Installation for details). In short, /usr/local is for Intel, /opt/homebrew for Apple Silicon (yes, it is ARM).

As for your makefile - you will likely have to adjust the following environment variables to the proper location. See here for some details, but you likely can use this (you may need to adjust the version depending on what is installed, v1.8.2 is current today, 1/26/22:

C_INCLUDE_PATH=/opt/homebrew/Cellar/librdkafka/1.8.2/include

LIBRARY_PATH=/opt/homebrew/Cellar/librdkafka/1.8.2/lib

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .