4

I am on OSX 10.9.5. I would like to use a later version of CURL than what is bundled with OSX, but I do not want to remove the OSX binary just in case, so I wanted to opt to install it via homebrew.

my PATH:

$ echo $PATH
/Users/Tom/.nvm/v0.10.33/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/Tom/.composer/vendor/bin:/usr/local/mysql/bin::~/Library/Trigger\ Toolkit:/usr/local/heroku/bin

as you can see, /usr/local/bin is almost at the front of the path, behind my Node nvm path.

result of $ brew install curl:

Warning: curl-7.38.0 already installed

result of $ curl:

dyld: Library not loaded: /usr/local/lib/libcurl.4.dylib
  Referenced from: /usr/local/bin/curl
  Reason: Incompatible library version: curl requires version 8.0.0 or later, but libcurl.4.dylib provides version 7.0.0
[1]    6481 trace trap  curl

What did I do wrong with the installation? Why didn't brew include the required libcurl version?

1

One solution was provided here

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.
  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 you /usr/bin/

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

0

Try running rm /usr/local/Cellar/curl then reinstalling. (This will delete your homebrew curl.)

Homebrew says this when i test installed curl:

Mac OS X already provides this software and installing another version in parallel can cause all kinds of trouble.

Generally there are no consequences of this for you. If you build your own software and it requires this formula, you'll need to add to your build variables:

LDFLAGS:  -L/usr/local/opt/curl/lib
CPPFLAGS: -I/usr/local/opt/curl/include
  • I also get that same message from Homebrew. What does this mean I need to do? I Just want to be able to use a more recent version of curl when I type curl in terminal. – Prefix Oct 29 '14 at 15:16
  • export LIBCURL_CFLAGS=-I/usr/local/opt/curl/include and export LIBCURL_LIBS=-L/usr/local/opt/curl/lib – DisplayName Oct 29 '14 at 15:26
  • I added both those to my .zshrc and sourced it, but when I do type curl I'm still being pointed to the OSX bundled curl, not my brew version. – Prefix Oct 29 '14 at 15:39

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.