brew install报错

fatal: not in a git directory

0

运行brew -v

zed $ brew -v

Homebrew 3.4.10-3-gbb3d970

fatal: unsafe repository (’/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core’ is owned by someone else)

To add an exception for this directory, call:

git config –global –add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core

Homebrew/homebrew-core (no Git repository)

fatal: unsafe repository (’/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask’ is owned by someone else)

To add an exception for this directory, call:

git config –global –add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask

Homebrew/homebrew-cask (no Git repository)

根据提示运行两个 git命令

Published At