I installed curl 7.77.0 with brew, but when I go to install other things with brew it fails to download on some things because its using the system version of curl which is 7.43.0. How can I make brew use the later version?

brew config

HOMEBREW_VERSION: 3.2.0-112-ga828538
ORIGIN: https://github.com/Homebrew/brew
HEAD: a828538dfceb1e6b0405e0576cb492df46b20b8e
Last commit: 2 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 55d78b5744433ce5649c1e49bb72390891aa1c67
Core tap last commit: 32 minutes ago
Core tap branch: master
Homebrew Ruby: 2.6.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/bin/ruby
CPU: 16-core 64-bit nehalem
Clang: 8.0.0 build 800
Git: 2.32.0 => /usr/local/bin/git
Curl: 7.43.0 => /usr/bin/curl
macOS: 10.11.6-x86_64
Xcode: 8.1


/usr/local/opt/curl/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin: No such file or directory



brew link curl --force

Warning: Refusing to link macOS provided/shadowed software: curl
If you need to have curl first in your PATH, run:
  echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> /Users/Admin/.bash_profile

For compilers to find curl you may need to set:
  export LDFLAGS="-L/usr/local/opt/curl/lib"
  export CPPFLAGS="-I/usr/local/opt/curl/include"

For pkg-config to find curl you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/curl/lib/pkgconfig"

cat .bash_profile

export PATH="/usr/local/opt/curl/bin:$PATH"
  • 1. Can you provide an example of a failure? 2. What macOS are you on? My system curl is 7.64.1.
    – JBallin
    Commented Jul 1, 2021 at 2:21
  • Hi @TimApple have you got /usr/local/bin in your path before /usr/bin - that will pickup whatever brew has installed. Yosemite has 7.43 of libcurl - see this answer over at Stack Overflow stackoverflow.com/q/10343834/15310387.
    – Mr R
    Commented Jul 1, 2021 at 2:47
  • @MrR I have got /usr/local/bin in my path before /usr/bin. which curl gives me /usr/bin/curl though, the system installed version instead of the brewed one. Im on El Capitan.
    – Tim Apple
    Commented Jul 1, 2021 at 4:35
  • @JBallin 1. brew install libvorbis fails with the error "curl: (35) Unknown SSL protocol error in connection to downloads.xiph.org:-9836", due to the outdated system version of curl that brew keeps opting to use. 2. El Capitan
    – Tim Apple
    Commented Jul 1, 2021 at 4:39
  • Check out apple.stackexchange.com/q/95855/151404
    – JBallin
    Commented Jul 1, 2021 at 4:55

2 Answers 2


To use the homebrew-installed curl set HOMEBREW_FORCE_BREWED_CURL. From man brew

If set, always use a Homebrew-installed curl(1) rather than the system version. Automatically set if the system version of curl is too old.


For Me MacOS Sonoma response of Mr R Works

Declare your Executable path before path of curl and brew in ~/.zshrc

export PATH="/usr/local/bin:$PATH"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .