Homebrew install specific version of formula?

后端 未结 27 2108
渐次进展
渐次进展 2020-11-21 11:21

How do I install a specific version of a formula in homebrew? For example, postgresql-8.4.4 instead of the latest 9.0.

27条回答
  •  我在风中等你
    2020-11-21 11:57

    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.

提交回复
热议问题