5

Before I start let me say I have uninstalled, reinstalled, compiled from source, used macports and generally tried for the last 6 hours to get curl working on my Mac OSX Mavericks but I still haven't come right.

If I try do anything with curl I get this:

dyld: Library not loaded: /opt/local/lib/libcurl.4.dylib
  Referenced from: /opt/local/bin/curl
  Reason: Incompatible library version: curl requires version 8.0.0 or later, but     libcurl.4.dylib provides version 7.0.0

However, if I check my curl I don't see anything wrong.

$ which curl
/opt/local/bin/curl

$ otool -L /opt/local/bin/curl
/opt/local/bin/curl:
    /opt/local/lib/libcurl.4.dylib (compatibility version 8.0.0, current version 8.0.0)
    /opt/local/lib/libidn.11.dylib (compatibility version 18.0.0, current version 18.9.0)
    /opt/local/lib/libldap-2.4.2.dylib (compatibility version 11.0.0, current version 11.3.0)
    /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
    /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 55471.14.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.14.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

$ otool -L /opt/local/lib/libcurl.4.dylib
/opt/local/lib/libcurl.4.dylib:
    /opt/local/lib/libcurl.4.dylib (compatibility version 8.0.0, current version 8.0.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.14.0)
    /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 55471.14.0)
    /opt/local/lib/libidn.11.dylib (compatibility version 18.0.0, current version 18.9.0)
    /opt/local/lib/libldap-2.4.2.dylib (compatibility version 11.0.0, current version 11.3.0)
    /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

My curl library is version 8.0.0 I did a locate libcurl.4.dylib | xargs otool -L and this showed that the only version 7.0.0 of curl I have exists within the MacOSX10.8.sdk/usr/lib folder and it is not symlinked from anywhere.

Any suggestions are welcome.

Thanks

2
  • Is there a reason why you don't use curl shipped with Mavericks and libcurl shipped with XCode?
    – user260419
    May 28, 2014 at 13:35
  • Doesn't come with HTTPS support. :(
    – System123
    May 28, 2014 at 13:53

2 Answers 2

1

I have the same problem with you.

  1. I suggest you to check the libcurl under /usr/lib/libcurl.4.dylib. If it is version 7.0.0, move it to another name and make a link to your /opt/local/lib/libcurl.4.dylib. But this may potentially affect the behaviors of some applications that use libcurl, thus not recommended.
  2. Or better, check possible configurations by running brew options formula-name and then runbrew install formular-name --with-brewed-curl if there is such options.
  3. You can build from source code and configure the LIBCURL_CFLAGS and LIBCURL_LIBS if 2 does not work.

I have not tried either 2 or 3. You can read this article here http://www.dreamhack.it/?p=95.

Hope it helps.

0

One solution was provided in http://curl.haxx.se/mail/archive-2014-10/0072.html

The idea is to make a static build of curl and then paste it to you /usr/bin/ or /usr/local/bin/. Briefly:

  1. ~$ xcode-select --install
  2. Download the latest version of curl from http://curl.haxx.se/download.html
  3. cd to the directory and run
    ~$ ./configure --disable-shared --with-darwinssl --enable-threaded-resolver
    ~$ make -j `sysctl -n hw.logicalcpu_max`
  4. Copy the compiled curl, which is located in ./src/curl to your /usr/bin/

Note: in the make command the sign "`" is indeed back quote, not single quote.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .