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.

Error: librdkafka++.so.1: cannot open shared object file

See original GitHub issue

Reposting of #394, as it was closed by the issue author without being fixed.

When trying to use run on Heroku (and I’m guessing other linuxed-powered server environments), the following error is triggered trying to require node-rdkafka@2.3.2:

Error: librdkafka++.so.1: cannot open shared object file: No such file or directory
    at Object.Module._extensions..node (module.js:681:18)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at bindings (/app/node_modules/bindings/bindings.js:81:44)
    at Object.<anonymous> (/app/node_modules/node-rdkafka/librdkafka.js:10:32)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)

The author of #394 suggested adding an Aptfile to your project, however, this is non-customary for npm packages. That said, I can’t exactly suggest a solution myself, being really unfamiliar with how Node.js binds to C/C++, the build systems work, etc.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:12
  • Comments:33 (9 by maintainers)

github_iconTop GitHub Comments

13reactions
Michael-Hoffmanncommented, Jul 21, 2018

I had the same Issue on Ubuntu 18.04. This worked for me:

  • sudo apt install librdkafka-dev
  • reinstall node-rdkafka
9reactions
bobrowadamcommented, Jul 9, 2018

We temporrarly solved this issue by supplying the following env var: LD_LIBRARY_PATH=<application path>/node_modules/node-rdkafka/build/deps Yes, it ain’t pretty

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: librdkafka.so.1: cannot open shared object file: No ...
After an hour of fighting with pip I've came up with a solution: this can be just put in requirement file confluent-kafka==0.9.2 --global-option ......
Read more >
edenhill/librdkafka - Gitter
I have verified that all files are installed properly in the folder. ... jig: error while loading shared libraries: librdkafka.so.1: cannot open shared...
Read more >
No such file or directory loading libssl.so.1.0.0 - Stack Overflow
It is because you use the "github.com/confluentinc/confluent-kafka-go/kafka" package. This one requires the librdkafka C libraries, ...
Read more >
Source code compilation - Bersler
OpenLogReplicator: error while loading shared libraries: libclntshcore.so.19.1: cannot open shared object file: No such file or directory.
Read more >
Install Librdkafka - Cloudera Documentation
Install the Apache Kafka C/C++ client library (librdkafka) to assist in configuring Fastcapa.
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