无法使用 brew 安装 boost 1.59

can't install boost 1.59 using brew

酿造:2.5.0

os : macos 10.15.6

当我执行命令时brew install boost@1.59

发生错误 Error: boost@1.59 has been disabled because it is a versioned formula!

我已经安装了 boost 那个版本是 1.73.0

嗯,boost@1.59 已被禁用。see

如果我们仍然需要它,我们可以构建我们自己的 brew 存储库。

我创建了一个 repo,它从官方仓库检查 boost@1.59.rb 并启用它。

然后打开终端,包括你的 repo brew tap [user]/[repo] [url] 并安装它。

例如

brew tap jokersun/my https://github.com/JokerSun/homebrew-my.git

brew update

brew search boost@1.59
> jokersun/my/boost@1.59 ✔

brew install jokersun/my/boost@1.59

它会编译并安装到您的电脑中很多分钟(在我的 mac 上大约需要 10m)。

我自己刚遇到这个问题。我通过以下方式解决了它:

brew edit boost@1.59

公式 *.rb 将在您的代码编辑器中打开。那时,删除行:

disable! because: :versioned_formula

保存。

运行:

brew install boost@1.59

可选:

brew link boost@1.60