【问题标题】:Homebrew installation presented with errorHomebrew 安装出现错误
【发布时间】:2018-12-10 15:39:59
【问题描述】:

在安装自制软件时出现此错误,有人可以解释发生了什么以及解决方案吗?

==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew

Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew...
fatal: cannot copy '/usr/local/Cellar/git/2.19.1/share/git-core/templates/hooks/fsmonitor-watchman.sample' to '/usr/local/Homebrew/.git/hooks/fsmonitor-watchman.sample':
 Permission denied
Failed during: git init -q

【问题讨论】:

标签: macos terminal homebrew


【解决方案1】:

您必须授予 Homebrew 在 /usr/local 中写入的权限。为此,运行的官方命令是:

cd /usr/local && sudo chown -R $(whoami) bin etc include lib sbin share var opt Cellar Caskroom Frameworks

详情请阅读官方troubleshooting page of Homebrew

如果/usr/local中没有安装依赖特定权限的应用,也可以运行:

sudo chown -R $(whoami) /usr/local/*

【讨论】:

    猜你喜欢
    • 2021-07-30
    • 1970-01-01
    • 1970-01-01
    • 2023-03-05
    • 1970-01-01
    • 2013-11-01
    • 2016-03-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多