I couldn't find the same error discussed in other threads. I'm installing Homebrew on a new MBA running macOS Ventura. I've done the usual prepping, but when running /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" I get:

[...]==> Downloading and installing Homebrew...remote: Enumerating objects: 234953, done.remote: Counting objects: 100% (623/623), done.remote: Compressing objects: 100% (391/391), done.remote: Total 234953 (delta 260), reused 550 (delta 212), pack-reused 234330Receiving objects: 100% (234953/234953), 68.36 MiB | 11.09 MiB/s, done.Resolving deltas: 100% (172239/172239), done.From https://github.com/Homebrew/brew* [new branch] master -> origin/master* [new branch] sorbet-files-update -> origin/sorbet-files-update* [new branch] test-runners -> origin/test-runners* [new tag] 0.1 -> 0.1[... a bunch of new tags ...]* [new tag] 4.0.8 -> 4.0.8* [new tag] 4.0.9 -> 4.0.9HEAD is now at a88397096 Merge pull request #15121 from singingwolfboy/pip-no-build-isolationError: Failed to download https://formulae.brew.sh/api/formula.jws.json!Error: Failure while executing; `/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --user-agent Homebrew/4.0.11\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.3\)\ curl/7.87.0 --header Accept-Language:\ en --fail --progress-bar --location --remote-time --output /Users/albep/Library/Caches/Homebrew/api/formula.jws.json --compressed --speed-limit 100 --speed-time 5 --progress-bar --silent https://formulae.brew.sh/api/formula.jws.json` exited with 22.Failed during: /opt/homebrew/bin/brew update --force --quiet

Any suggestions on how to fix this?

1

Best Answer


It seems the error I encountered is a temporary glitch that happens from time to time. I followed the suggestions discussed in this thread https://github.com/orgs/Homebrew/discussions/4236 (namely, erased the Homebrew installation cache and re-run the installer) and it worked.