如何在 macOS 上通过 Homebrew 安装 Ansible20

How to install Ansible20 via Homebrew on macOS

直到几个月前,我已经做过很多次了。

自从现在弃用版本后,步骤似乎发生了变化?

1) brew tap homebrew/versions

2) brew search ansible

3) Returns ansible@2.0 作为选项

4) brew install ansible20

5) 最后brew install homebrew/versions/ansible20

但是我现在收到以下回复

Warning: Use ansible20 instead of deprecated homebrew/versions/ansible20 Error: No available formula with the name "homebrew/core/ansible20" ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching taps... Error: No formulae found in taps.

/core/不是有相同的公式吗?版本发生了什么变化?

您可以在核心中使用 ansible@2.0 代替 ansible20

只是 运行 brew install ansible@2.0.

摘自https://github.com/Homebrew/homebrew-versions

This tap was deprecated because homebrew/core has started to support multiple versions. All widely used, buildable formulae will be migrated to homebrew/core. Learn more about this migration in the Versions documentation.

摘自http://docs.brew.sh/Versions.html(上述"the Versions documentation")

In Homebrew/versions the formula for GCC 6 was named gcc6.rb and began class Gcc6 < Formula. In Homebrew/core this same formula is named gcc@6.rb and begins class GccAT6 < Formula.