admin管理员组文章数量:1124028
I'm trying to add Karafka to an existing Ruby project and running into Architecture issues while trying to install the gems on my M1 Mac. I've faced this issue with other gems in the past but my current configurations resolved all of those. I'm at a loss why Karafka is running into these issues now. Looking at their Repo and Issues I don't see a solution for this. Has anyone else run into it?
Running
gem install karafka
Using:
Apple clang version 16.0.0 (clang-1600.0.26.4)
Target: arm64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Ruby 3.1.4
rbenv 1.3.2
-I/usr/local/Cellar/openssl@3/3.3.2
Errors
g++ -MD -MP -I/opt/homebrew/opt/libpq/include -I/opt/homebrew/opt/libpq/include -gstrict-dwarf -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -Wcast-align -I/opt/homebrew/opt/libpq/include -gstrict-dwarf -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -Wcast-align -Wno-non-virtual-dtor -c RdKafka.cpp -o RdKafka.o
RdKafka.cpp:29:10: fatal error: 'string' file not found
29 | #include <string>
| ^~~~~~~~
1 error generated.
make[1]: *** [RdKafka.o] Error 1
make: *** [libs] Error 2
----- end of file -----
I'm trying to add Karafka to an existing Ruby project and running into Architecture issues while trying to install the gems on my M1 Mac. I've faced this issue with other gems in the past but my current configurations resolved all of those. I'm at a loss why Karafka is running into these issues now. Looking at their Repo and Issues I don't see a solution for this. Has anyone else run into it?
Running
gem install karafka
Using:
Apple clang version 16.0.0 (clang-1600.0.26.4)
Target: arm64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Ruby 3.1.4
rbenv 1.3.2
-I/usr/local/Cellar/openssl@3/3.3.2
Errors
g++ -MD -MP -I/opt/homebrew/opt/libpq/include -I/opt/homebrew/opt/libpq/include -gstrict-dwarf -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -Wcast-align -I/opt/homebrew/opt/libpq/include -gstrict-dwarf -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -Wcast-align -Wno-non-virtual-dtor -c RdKafka.cpp -o RdKafka.o
RdKafka.cpp:29:10: fatal error: 'string' file not found
29 | #include <string>
| ^~~~~~~~
1 error generated.
make[1]: *** [RdKafka.o] Error 1
make: *** [libs] Error 2
----- end of file -----
Share
Improve this question
edited yesterday
Kyle
asked yesterday
KyleKyle
1,5041 gold badge12 silver badges39 bronze badges
1
- Did you try to install a lower version? – Gwang-Jin Kim Commented yesterday
1 Answer
Reset to default 2Karafka author here. Please see this thread: https://github.com/karafka/karafka-rdkafka/issues/126
I am actively working to provide a systematic solution that covers all the MacOS versions, meanwhile please put this in your zshrc
:
export CPPFLAGS="-I/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/"
本文标签: rubyUnable to install Karafka gem on M1 MacStack Overflow
版权声明:本文标题:ruby - Unable to install Karafka gem on M1 Mac - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736610931a1945440.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论