I downloaded the source file from https://curl.haxx.se/download/ (curl-7.59.0.tar.bz2) to build the curl command line tool, or so I thought. I followed the instructions on curl's site (./configure, make, make install) without difficulty.

The document (https://curl.haxx.se/docs/install.html) says that the source should provide both curl and libcurl. I can only see libcurl when I open the directory, which is what I don't understand. Here is the output when I look inside the usr/local/lib directory, where libcurl was installed:

my-macbook:lib Kumitan$ ls
libcurl.4.dylib libcurl.a   libcurl.dylib   libcurl.la  pkgconfig

All of these are libcurl. I get the feeling that I must have missed out a step or I'm not understanding something here.

I understand that curl (the application) is made using libcurl (the library), so why am I not seeing a separate curl tool in this directory? Why can I only see libcurl files if this is meant to install curl as well? Surely the curl tool would also be built along with libcurl? Or are they the same thing?

Background information: My computer is running Mac OSX 10.6.8. I'm trying to update/upgrade the current version of curl on the computer (7.19) by installing a newer version so that I can use curl to install homebrew. I can't upgrade to Mountain Lion (OSX 10.7).

NB: I can't just install curl using homebrew, because my curl version is too old to actually run the script to install homebrew itself.

  • @DavidPostill I should have said I read that in the question. Edited. – user946890 Sep 22 '18 at 21:37
  • I'd expect the default install directory for curl to be /usr/local/bin. Prior to make install curl would be found in src. (Your question isn't clear). – user187561 Sep 22 '18 at 22:49

I managed to solve this.

To answer my own question, it turns out that libcurl and curl were kept in separate folders, which is why I couldn't see curl and curl-config in the same folder as all the libcurl stuff.

Libcurl went into usr/local/lib and could also be found in usr/local/bin/lib (for some reason), and curl (the files curl and curl-config) went into usr/local/bin/bin.

I will also show how I solved my issue.

The computer's current curl installation was in /usr/bin, which is also probably where it expects to find curl. For this reason, it didn't take note of the new curl in usr/local. So I deleted the curl and curl-config files that were currently in /usr/bin, then moved the new curl files from /usr/local/... into /usr/bin to replace the old ones.

Please note: Deleting your system-provided files in dangerous. You should leave them there so that things that need to can still access the old version. See comments for more.

Now curl -V is returning 7.59.0, which means it's been updated. Yay!

  • 1
    Congrats on solving your problem, but you should never delete files provided by the Operating System. The default curl may be used by system tools that rely on features specific to the version installed. In the future, add /usr/local/bin to the front of your PATH, so the new version will be found by anything you do, while the older version can still be accessed by system tools. – MMB Sep 25 '18 at 0:45
  • @MMB Thanks for the advice. I will add it into my answer so that other's don't make the same mistake. – user946890 Sep 25 '18 at 15:00

Your Answer

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