Node-rdkafka: Installation failure with "ld: symbol(s) not found for architecture x86_64" on mac OS

Created on 5 Sep 2018  路  1Comment  路  Source: Blizzard/node-rdkafka

Environment Information

  • OS [e.g. Mac OS High Sierra V 10.13.6]:
  • Node Version [e.g. 8.11.4]:
  • NPM Version [e.g. 5.6.0]:
  • node-rdkafka version [e.g. 2.3.3]:

Steps to Reproduce
npm i node-rdkafka

node-rdkafka Configuration Settings

Additional context
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: * [librdkafka.1.dylib] Error 1
make[1]:
[libs] Error 2
make: *
* [deps_librdkafka_gyp_librdkafka_target_build_dependencies.intermediate] Error 2
rm deps_librdkafka_gyp_librdkafka_target_build_dependencies.intermediate
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/devarajk/digital-behavior/dbdm_event_streaming/node_modules/node-rdkafka
gyp ERR! node -v v8.11.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Most helpful comment

solved by installing librdkafka based on solution provided in https://github.com/Blizzard/node-rdkafka/issues/403
brew install librdkafka
export BUILD_LIBRDKAFKA=0
npm install

>All comments

solved by installing librdkafka based on solution provided in https://github.com/Blizzard/node-rdkafka/issues/403
brew install librdkafka
export BUILD_LIBRDKAFKA=0
npm install

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bigclap picture bigclap  路  5Comments

klalafaryan picture klalafaryan  路  5Comments

ivomirra picture ivomirra  路  3Comments

codeburke picture codeburke  路  3Comments

clChenLiang picture clChenLiang  路  3Comments