libcurl or cURL not working OSX Mavericks

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


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.