My Xcode build requires cURL 8.0.0 or later (which doesn't exist)
Try reinstalling curl package, e.g.

brew update
brew reinstall curl libcurl


This should fix the broken dependencies.

If this won't help, then try to comment out or remove any DYLD_LIBRARY_PATH, DYLD_FALLBACK_LIBRARY_PATH or DYLD_FRAMEWORK_PATH references from the startup shell scripts (e.g. ~/.bash_profile).