我运行这个:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
我得到提示:
==> 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
单击“返回”(输入按钮)后,我收到此错误:
==> Downloading and installing Homebrew...
fatal: cannot copy '/usr/local/git/share/git-core/templates/hooks/pre-receive.sample' to '/usr/local/Homebrew/.git/hooks/pre-receive.sample': Permission denied
Failed during: git init -q
有什么想法我面临着什么样的错误以及可以做什么吗?我不太清楚,因为这是我第一次面对这样的事情。
将文件下载到时您的权限被拒绝/usr/local
.
该文件夹通常属于根目录。这是brew 的一个已知问题。通过这样做修复它
sudo chown -R $(whoami) $(brew --prefix)/*
然后重新运行安装程序。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)