Homebrew install specific version of formula?

后端 未结 27 2506
渐次进展
渐次进展 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:23

    Along the lines of @halfcube's suggestion, this works really well:

    1. Find the library you're looking for at https://github.com/Homebrew/homebrew-core/tree/master/Formula
    2. Click it: https://github.com/Homebrew/homebrew-core/blob/master/Formula/postgresql.rb
    3. Click the "history" button to look at old commits: https://github.com/Homebrew/homebrew-core/commits/master/Formula/postgresql.rb
    4. Click the one you want: "postgresql: update version to 8.4.4", https://github.com/Homebrew/homebrew-core/blob/8cf29889111b44fd797c01db3cf406b0b14e858c/Formula/postgresql.rb
    5. Click the "raw" link: https://raw.githubusercontent.com/Homebrew/homebrew-core/8cf29889111b44fd797c01db3cf406b0b14e858c/Formula/postgresql.rb
    6. brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/8cf29889111b44fd797c01db3cf406b0b14e858c/Formula/postgresql.rb

提交回复
热议问题