-
Notifications
You must be signed in to change notification settings - Fork 902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: librdkafka.so.1: cannot open shared object file: No such file or directory #65
Comments
This issue may have something in common with #45. Also if setup.py will provide a way to automatically install |
If you install librdkafka to a location outside the standard ld.so paths, such as /usr/local, you will need to provide a hint to the runtime linker where to find it and you typically do this with the environment variable |
Or preferably: you could install a librdkafka RPM, Deb or Homebrew package (depending on your platform). |
After an hour of fighting with pip I've came up with a solution: this can be just put in requirement file |
Also according to https://pip.pypa.io/en/stable/reference/pip_install/#per-requirement-overrides it requires pip>=7.0 |
Arrrgh, it turned out to be a problem. After fighting with pip for another couple of hours here's a working receipt to sum it up: to be able to put it into requirements.txt:
|
That looks like a good solution, the problem is that it hardcodes the librdkafka library path, which might be /opt on some systems, /usr/local or ~/hi/there on others. We might want to consider linking librdkafka statically by default, so the path setup is only needed on build, and providing an option to do dynamic linking (for people that want to be able to just upgrade the C library - which is the preferred method from an ops perspective) |
This is oldish issue but I just happened to run in to this so I thought that I share my solution to help others. I did build and install Here are the steps:
After that I'm able to import stuff without specifying |
thanks a lot for
|
We'll keep this issue open so that new users can find it easily. |
@edenhill Does it make sense to add a note in the README with a link to this issue for additional details? |
@rnpridgeon I don't think we need to since the binary wheels probably solves this for most users. |
👍 added 'FAQ' tag to mark informative issues |
Closing since binary wheels where added with 0.11.4 which should solve this in most cases. It will continue to be archived with the |
This how to build in DOCKER to resolve this WORKDIR /opt/ WORKDIR / RUN apt-get install -y git-core |
I'm also stuck at this in some way, getting the If I do it via an EC2 instance (with pipenv), this is working fine and it get the If I package this inside inside my running jenkins container (alpine based), which also got the librdkafka installed (like suvendurinku described), the Is there something I'm missing? |
@tpschmidt Make sure to use the binary wheels of confluent-kafka as they come with a prebaked librdkafka. |
Thanks lot, it's save my day |
|
Ubuntu 14 here, pip==7.1.2, setuptools==18.3.2, virtualenv==13.1.2.
First, I want to build latest stable (seems it's 0.9.2)
librdkafka
into/opt/librdkafka
.I have a virtualenv and want to install latest stable
confluent-kafka
.But then a test script fails:
Am I doing something wrong?
The text was updated successfully, but these errors were encountered: