Homebrew broken and unable to install anything

Viewed 1051
~ % brew install curl
==> Downloading https://ghcr.io/v2/homebrew/core/brotli/manifests/1.0.9
Already downloaded: /Users/currentuser/Library/Caches/Homebrew/downloads/922ce7b351cec833f9bd2641f27d8ac011005f8b1f7e1119b8271cfb4c0d3cd7--brotli-1.0.9.bottle_manifest.json
Error: curl: Failed to download resource "brotli_bottle_manifest"
The downloaded GitHub Packages manifest was corrupted or modified (it is not valid JSON):
/Users/currentuser/Library/Caches/Homebrew/downloads/922ce7b351cec833f9bd2641f27d8ac011005f8b1f7e1119b8271cfb4c0d3cd7--brotli-1.0.9.bottle_manifest.json

My Homebrew is broken and is unable to install anything. A typical output is above

3 Answers

The problem was resolved after delete /Users/currentuser/Library/Caches/Homebrew/downloads/922ce7b351cec833f9bd2641f27d8ac011005f8b1f7e1119b8271cfb4c0d3cd7--brotli-1.0.9.bottle_manifest.json and run brew install curl again

I have also this problem with brew install php the problem persists even after deleting all the files from

/Users/currentuser/Library/Caches/Homebrew/downloads/

and

brew install php again

i have also tried

HOMEBREW_FORCE_BREWED_CURL=1 brew install openssl

It might be using the installed curl instead of system curl. From man brew

set HOMEBREW_FORCE_BREWED_CURL

Related