【问题标题】:Unlinked kegs in cellar when trying to brew install watchman尝试 brew install watchman 时,地窖中未链接的小桶
【发布时间】:2018-05-01 06:58:11
【问题描述】:

我正在尝试通过 Homebrew 安装 watchman。

当它尝试安装其依赖项之一时,我收到此错误:

==> Installing watchman dependency: python@2
==> Downloading https://homebrew.bintray.com/bottles/python@2-2.7.14_3.high_sierra.bottle.2
######################################################################## 100.0%
==> Pouring python@2-2.7.14_3.high_sierra.bottle.2.tar.gz
Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
Permission denied @ dir_s_mkdir - /usr/local/Frameworks
Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks

运行brew doctor 给了我:

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  python@2
  gnupg

Warning: Broken symlinks were found. Remove them with `brew prune`:
  /usr/local/bin/electron

当我尝试brew link --overwrite python@2 时,我得到:

Linking /usr/local/Cellar/python@2/2.7.14_3... Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks

当我尝试brew remove python@2 时,我得到:

Error: Refusing to uninstall /usr/local/Cellar/python@2/2.7.14_3
because it is required by mongodb, which is currently installed.
You can override this and force removal with:
  brew uninstall --ignore-dependencies python@2

我在这里有点迷路,因为我几乎没有使用 brew 的经验。我只想安装守望者!

【问题讨论】:

    标签: homebrew watchman


    【解决方案1】:

    似乎 brew 正在尝试链接 python@2 但无法链接,因为它无法创建文件夹 /usr/local/Frameworks

    通过以下步骤解决了这个问题:

    sudo mkdir -p /usr/local/Frameworks
    sudo chown -R $(whoami) /usr/local/*
    brew link python@2
    

    【讨论】:

      猜你喜欢
      • 2023-02-06
      • 2015-09-12
      • 2019-01-23
      • 2011-05-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多