How do I install a specific version of a formula in homebrew? For example, postgresql-8.4.4 instead of the latest 9.0.
Currently the old ways of installing specific formula versions have been deprecated. So it seems like we have to use brew edit [formula]
. E.g. say we want to install an the 62.1
version of icu4c
(needed e.g. for postgresql 10.5
). Then you'd have to
> brew edit icu4c
# drops you to editor
Here you'd have to alter the url
, version
and sha256
(perhaps also mirror
) to the corresponding 62.1
strings.
url "https://ssl.icu-project.org/files/icu4c/62.1/icu4c-62_1-src.tgz"
mirror "https://github.com/unicode-org/icu/releases/download/release-62-1/icu4c-62_1-src.tgz"
version "62.1"
sha256 "3dd9868d666350dda66a6e305eecde9d479fb70b30d5b55d78a1deffb97d5aa3"
then run brew reinstall icu4c
to finally download the 62.1
version.