几天前,我从Windows迁移到macOS。我想安装自制软件。我使用了以下命令
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
Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew...
/usr/local/Homebrew/.git/branches/: Permission denied
Failed during: git init -q
==> Installation successful!
==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
No analytics data has been sent yet (or will be during this `install` run).
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
error: could not lock config file .git/config: Permission denied
Failed during: git config --replace-all homebrew.analyticsmessage true
==> Next steps:
- Run `brew help` to get started
- Further documentation:
https://docs.brew.sh
我检查了许多其他Stackoverflow答案,并在线关注了文章,但没有任何解决方法。
comptag:~ username$ brew install curl
-bash: /usr/local/bin/brew: No such file or directory
请给我建议一些解决方案。
答案 0 :(得分:0)
使用Homebrew website上给出的官方命令:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"