【问题标题】:Remove boost using brew and install specific version使用 brew 删除 boost 并安装特定版本
【发布时间】:2019-12-16 14:23:41
【问题描述】:
brew info boost
boost: stable 1.71.0 (bottled), HEAD
Collection of portable C++ source libraries
https://www.boost.org/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/boost.rb
==> Dependencies
Required: icu4c ✔
==> Options
--HEAD
    Install HEAD version
==> Caveats
Building of Boost.Log is disabled because it requires newer GCC or Clang.
==> Analytics
install: 31,607 (30 days), 109,724 (90 days), 590,627 (365 days)
install-on-request: 11,180 (30 days), 39,021 (90 days), 197,063 (365 days)
build-error: 0 (30 days)


brew --version
Homebrew 2.2.1
Homebrew/homebrew-core (git revision 87d2; last commit 2019-12-16)
Homebrew/homebrew-cask (git revision cb1c4; last commit 2019-12-16)


brew uninstall boost
Error: No such keg: /usr/local/Cellar/boost


brew remove boost
Error: No such keg: /usr/local/Cellar/boost


brew install boost@1.59

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
No changes to formulae.

Warning: boost@1.59 1.59.0 is already installed and up-to-date
To reinstall 1.59.0, run `brew reinstall boost@1.59`


brew switch boost 1.59
Error: boost not found in the Cellar.


brew list | grep boost
boost@1.59

为什么brew info 显示的是 1.71.0 版本? 为什么我无法删除或卸载 boost?

【问题讨论】:

    标签: macos boost homebrew


    【解决方案1】:

    brew info 命令显示了 boost 的最后一个可用版本,即 1.7.10。这是正确的。

    当您运行 brew uninstall boostbrew remove boost 时,Homebrew 会尝试删除最后一个版本 (1.7.10)。 Homebrew 没有成功,因为没有安装这个版本。这是正确的。

    您已安装公式boost@1.59,它与boost 不同。您可以使用brew remove boost@1.59 将其删除,或使用brew info boost@1.59 获取有关如何使用它的信息。

    【讨论】:

      猜你喜欢
      • 2019-05-19
      • 2017-12-01
      • 2021-11-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多