Homebrew install specific version of formula?

后端 未结 27 2097
渐次进展
渐次进展 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 12:22

    Install an old brew package version (Flyway 4.2.0 example)

    Find your local homebrew git dir or clone Homebrew/homebrew-core locally

    cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/

    OR

    git clone git@github.com:Homebrew/homebrew-core.git

    List all available versions

    git log master -- Formula/flyway.rb

    Copy the commit ID for the version you want and install it directly

    brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/793abfa325531415184e1549836c982b39e89299/Formula/flyway.rb

提交回复
热议问题