我想使用 brew install carthage
命令在我的 Mac OS 上安装 Carthage。然而,我收到了以下错误:
touch: /usr/local/Homebrew/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/.git/FETCH_HEAD: Permission denied
fatal: Unable to create '/usr/local/Homebrew/.git/index.lock': Permission denied
error: could not lock config file .git/config: Permission denied
Warning: carthage 0.26.2 is already installed, it's just not linked.
You can use `brew link carthage` to link this version.
当我使用sudo brew install carthage
时,我也遇到了以下错误:
当我使用sudo brew install carthage
时,我也遇到了以下错误:
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
你能告诉我问题出在哪里吗?先谢谢了。
brew doctor
命令,按照其建议进行处理,然后再尝试一次。 - bfontaine