How to install cURL on macOS with Homebrew?

Add export PATH=/usr/local/bin:$PATH to your .bashrc for example to use the bin installed with Homebrew.


I installed curl on macOS via Homebrew but curl didn't appear in /usr/local/bin, so from /usr/local I did a search

[/usr/local]$ find . -iname *curl*

which found curl hidden away at

./Cellar/curl/7.77.0/bin/curl

and a check of that showed it as executable:

[/usr/local]$ ls -l ./Cellar/curl/7.77.0/bin/curl
-r-xr-xr-x  1 xxxxxx  admin  264776 Jun 21 16:19 ./Cellar/curl/7.77.0/bin/curl

and executing gave the expected version:

[/usr/local]$ ./Cellar/curl/7.77.0/bin/curl --version
curl 7.77.0 (x86_64-apple-darwin19.6.0) libcurl/7.77.0 ...

so there's how I managed to run the brew version. hth