0

我正在尝试通过 Homebrew 安装守望者。

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

==> 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 的经验。我只想安装守望者!

4

1 回答 1

0

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

这是通过以下步骤解决的:

sudo mkdir -p /usr/local/Frameworks
sudo chown -R $(whoami) /usr/local/*
brew link python@2
于 2018-05-01T07:40:56.600 回答