question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installation node-rdkafka issue

See original GitHub issue

I am trying to download and install node-rdkafka using the following link, on MacBook pro.

https://github.com/blizzard/node-rdkafka https://blizzard.github.io/node-rdkafka/current/

It is just mentioned this command, “npm install node-rdkafka” to install it.

But, I am getting the following errors:

============================================================= Users:Node-rdKafka Users$ npm install node-rdkafka /

node-rdkafka@2.2.1 preinstall /Users/Users/Downloads/Node-rdKafka/node_modules/node-rdkafka node util/configure

checking for OS or distribution… ok (osx) checking for C compiler from CC env… failed checking for gcc (by command)… ok checking for C++ compiler from CXX env… failed checking for C++ compiler (g++)… ok checking executable ld… ok checking executable nm… ok checking executable objdump… ok checking executable strip… ok checking for debug symbols compiler flag (-g…)… ok checking for pkgconfig (by command)… failed checking for install (by command)… failed checking for PIC (by compile)… ok checking for GNU-compatible linker options… failed checking for OSX linker options… ok checking for GNU linker-script ld flag… failed checking for Solaris linker-script ld flag… failed (ignore) checking for __atomic_32 (by compile)… ok checking for __atomic_64 (by compile)… ok checking for socket (by compile)… ok parsing version ‘0x000b01ff’… ok (0.11.1) checking for libpthread (by compile)… ok checking for zlib (by compile)… ok checking for libcrypto (by compile)… failed (disable) checking for liblz4 (by compile)… failed (disable) checking for libssl (by compile)… failed (disable) checking for libsasl2 (by compile)… ok checking for crc32chw (by compile)… ok checking for regex (by compile)… ok checking for librt (by compile)… failed checking for strndup (by compile)… ok checking for strerror_r (by compile)… ok checking for libdl (by compile)… ok checking for nm (by env NM)… ok (cached) Generated Makefile.config Generated config.h

Configuration summary: prefix /usr/local ARCH x86_64 CPU generic GEN_PKG_CONFIG y ENABLE_DEVEL n ENABLE_VALGRIND n ENABLE_REFCNT_DEBUG n ENABLE_SHAREDPTR_DEBUG n ENABLE_LZ4_EXT y ENABLE_SSL y ENABLE_SASL y MKL_APP_NAME librdkafka MKL_APP_DESC_ONELINE The Apache Kafka C/C++ library MKL_DISTRO osx SOLIB_EXT .dylib CC gcc CXX g++ LD ld NM nm OBJDUMP objdump STRIP strip CPPFLAGS -gstrict-dwarf -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -Wcast-align PKG_CONFIG pkg-config INSTALL install LIB_LDFLAGS -shared -dynamiclib -Wl,-install_name,$(DESTDIR)$(libdir)/$(LIBFILENAME) RDKAFKA_VERSION_STR 0.11.1 MKL_APP_VERSION 0.11.1 LIBS -lpthread -lz -lsasl2 -ldl CXXFLAGS -Wno-non-virtual-dtor SYMDUMPER $(NM) -g exec_prefix /usr/local bindir /usr/local/bin sbindir /usr/local/sbin libexecdir /usr/local/libexec datadir /usr/local/share sysconfdir /usr/local/etc sharedstatedir /usr/local/com localstatedir /usr/local/var libdir /usr/local/lib includedir /usr/local/include infodir /usr/local/info mandir /usr/local/man Generated config.cache

Now type ‘make’ to build \

node-rdkafka@2.2.1 install /Users/Users/Downloads/Node-rdKafka/node_modules/node-rdkafka node-gyp rebuild

CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_broker.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_msg.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_topic.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_conf.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_timer.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_offset.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_transport.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_buf.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_queue.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_op.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_request.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_cgrp.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_pattern.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_partition.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_subscription.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_assignor.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_range_assignor.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_roundrobin_assignor.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_feature.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdcrc32.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/crc32c.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdaddr.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdrand.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdlist.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/tinycthread.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdlog.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdstring.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_event.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_metadata.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdregex.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdports.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_metadata_cache.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdavl.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_sasl.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_sasl_plain.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_interceptor.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_msgset_writer.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_msgset_reader.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdvarint.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdbuf.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdunittest.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_lz4.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/xxhash.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_sasl_cyrus.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/snappy.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdgz.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rddl.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_plugin.o LIBTOOL-STATIC Release/rdkafka.a CXX(target) Release/obj.target/librdkafkacpp/deps/librdkafka/src-cpp/RdKafka.o CXX(target) Release/obj.target/librdkafkacpp/deps/librdkafka/src-cpp/ConfImpl.o CXX(target) Release/obj.target/librdkafkacpp/deps/librdkafka/src-cpp/HandleImpl.o CXX(target) Release/obj.target/librdkafkacpp/deps/librdkafka/src-cpp/ConsumerImpl.o CXX(target) Release/obj.target/librdkafkacpp/deps/librdkafka/src-cpp/ProducerImpl.o CXX(target) Release/obj.target/librdkafkacpp/deps/librdkafka/src-cpp/KafkaConsumerImpl.o CXX(target) Release/obj.target/librdkafkacpp/deps/librdkafka/src-cpp/TopicImpl.o CXX(target) Release/obj.target/librdkafkacpp/deps/librdkafka/src-cpp/TopicPartitionImpl.o CXX(target) Release/obj.target/librdkafkacpp/deps/librdkafka/src-cpp/MessageImpl.o CXX(target) Release/obj.target/librdkafkacpp/deps/librdkafka/src-cpp/QueueImpl.o CXX(target) Release/obj.target/librdkafkacpp/deps/librdkafka/src-cpp/MetadataImpl.o LIBTOOL-STATIC Release/rdkafkacpp.a CXX(target) Release/obj.target/node-librdkafka/src/binding.o CXX(target) Release/obj.target/node-librdkafka/src/callbacks.o CXX(target) Release/obj.target/node-librdkafka/src/common.o CXX(target) Release/obj.target/node-librdkafka/src/config.o CXX(target) Release/obj.target/node-librdkafka/src/connection.o CXX(target) Release/obj.target/node-librdkafka/src/errors.o CXX(target) Release/obj.target/node-librdkafka/src/kafka-consumer.o CXX(target) Release/obj.target/node-librdkafka/src/producer.o CXX(target) Release/obj.target/node-librdkafka/src/topic.o CXX(target) Release/obj.target/node-librdkafka/src/workers.o SOLINK_MODULE(target) Release/node-librdkafka.node ld: library not found for -lcrypto clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Release/node-librdkafka.node] Error 1 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:276:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Darwin 16.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/Users/Downloads/Node-rdKafka/node_modules/node-rdkafka gyp ERR! node -v v4.4.3 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok npm ERR! Darwin 16.7.0 npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “node-rdkafka” npm ERR! node v4.4.3 npm ERR! npm v2.15.1 npm ERR! code ELIFECYCLE

npm ERR! node-rdkafka@2.2.1 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-rdkafka@2.2.1 install script ‘node-gyp rebuild’. npm ERR! This is most likely a problem with the node-rdkafka package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs node-rdkafka npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm ERR! npm owner ls node-rdkafka npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/Users/Downloads/Node-rdKafka/npm-debug.log Users:Node-rdKafka Users$

Could anyone share me your suggestions if you have already worked on node-rdkafka?

Thanks.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

1reaction
erik-stephenscommented, Dec 4, 2017

checking for libcrypto (by compile)… failed (disable) … ld: library not found for -lcrypto

Does it work if you brew install openssl first?

0reactions
webmakerstevecommented, Jan 8, 2018

Your issue was ld: library not found for -lcrypto

You need to install lcrypto or make sure it is in your ld search paths. It comes with openssl. Closing the issue because it looks like you’ve both solved it 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

NPM install node-rdkafka fails with node-gyp rebuild error
Failed at the node-rdkafka@2.7.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output ...
Read more >
npm install not working · Issue #751 · Blizzard/node-rdkafka
Failed at the node-rdkafka@2.7.4 install script.
Read more >
node-rdkafka - npm
This library includes two utility functions for detecting the status of your installation. Please try to include these when making issue reports ...
Read more >
Installing node-rdkafka on M1 for use with SASL
Here's a short, step by step guide on installing the node-rdkafka client ... If you're still running into issues, you can post a...
Read more >
T158617 npm install fails for changeprop service in MW ...
Exit status 1 npm ERR! npm ERR! Failed at the node-rdkafka@0.6.4 install script 'node-gyp rebuild'. npm ERR! This is most likely a problem...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found