Search code examples
curlhomebrew

`brew upgrade` results in "curl: (22) The requested URL returned error: 404" error


running brew upgrade produces the following error

==> Downloading https://formulae.brew.sh/api/cask.jws.json curl: (22) The requested URL returned error: 404

Error: Failure while executing; /usr/bin/env /usr/local/Homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --user-agent Homebrew/4.0.13\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 12.6.2\)\ curl/7.79.1 --header Accept-Language:\ en --fail --progress-bar --location --remote-time --output /Users/username/Library/Caches/Homebrew/api/cask.jws.json --compressed --speed-limit 100 --speed-time 5 --progress-bar https://formulae.brew.sh/api/cask.jws.json exited with 22. Here's the output: curl: (22) The requested URL returned error: 404

other operations like brew list work perfectly fine


Solution

  • I was able to solve this issue by rerunning the install -- found here

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"