brew install specific version of a package fails

1.5k Views Asked by At

For my project, I need to install a specific version of the icu4c package. I used to follow the instructions written in this answer and it was working. However, recently, when I needed to do the same, it failed with the following error

Error: icu4c: undefined method `cellar' for #<BottleSpecification:0x00007fa0d75096a8>

After some investigations, I concluded that brew has new style of .rb files and old versions may not be compatible. To fix it, I run brew style --fix icu4c.rb which seemed to fix the style issues. However, now, I got the following error:

Error: Failed to load cask: ./icu4c.rb
Cask 'icu4c' is unreadable: wrong constant name #<Class:0x00007fa68d2d9278>
Warning: Treating ./icu4c.rb as a formula.
==> Downloading https://ghcr.io/v2/homebrew/core/icu4c/manifests/67.1
#=#=#
curl: (22) The requested URL returned error: 404
Error: Failed to download resource "icu4c_bottle_manifest"
Download failed: https://ghcr.io/v2/homebrew/core/icu4c/manifests/67.1

I saw a number of places that this might be due to curl or xcode command line tools. I updated both of them but could not proceed further. Any help would be greatly appreciated.

0

There are 0 best solutions below