2

Here's my situation. I'm running Centos 7, have the standard version of libcurl as provided by my package manager, and several programs that depend on libcurl.

One of them is pycurl, a python binding for libcurl. I think it dynamically loads libcurl when python runs?

I would like pycurl to use a custom build of libcurl, and all other programs to use the standard version. How can I do this?

  • Build it against your custom version? – Faheem Mitha Nov 5 '14 at 15:44
1

I think it dynamically loads libcurl when python runs?

Yep.

I would like pycurl to use a custom build of libcurl, and all other programs to use the standard version.

Make sure your libcurl is not installed into one of the standard library paths, including /usr/local/lib. If it's /opt/curl/lib, before you run python:

export LD_LIBRARY_PATH=/opt/curl/lib:$LD_LIBRARY_PATH

Most likely it is not currently defined but the last part (:$LD_LIBRARY_PATH) is there just in case. This overrides the standard search paths used by the linker/loader, so if you have a compatible libcurl in there, that's what will get loaded.

You should be able to check this by subsequently running ldd on the pycurl module binary, where ever that is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.