macOS
macOS comes with the curl tool bundled with the operating system for manyyears. If you want to upgrade to the latest version shipped by the curlproject, we recommend installinghomebrew (a macOSsoftware package manager) and then install the curl package from them:
brew install curl
Note that when installing curl, brew does not create acurl
symlinkin the default homebrew folder, to avoid clashes with the macOS version of curl.
Run the following to make brew curl the default one in your shell:
echo 'export PATH="$(brew --prefix)/opt/curl/bin:$PATH"' >> ~/.zshrcsource ~/.zshrc
Get libcurl for macOS
When you installcurl
the tool with homebrew as described above, it alsoinstalls libcurl together with its associated headers.
libcurl is also installed with macOS itself and always present, and if youinstall the development environmentXCode
from Apple, you can use libcurldirectly without having to install anything extra as the curl include filesare bundled there.