Mac M1 Brew install 报错Command failed with exit 128:git

question:

Record a problem, the reason is that an error occurred in installing a Redis using Brew on Mac today, and it is also the first time for me to use Brew.
Theoretically, this kind of error can be solved by using brew installation!

Specifically, as shown in the figure, execute brew install redis and report an error Command failed with exit 128:git

Solution:

After entering brew -v , you will be prompted to execute two configuration commands, just copy and execute it directly!

git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask
Homebrew/homebrew-cask

git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core
Homebrew/homebrew-core

The details are shown in the figure below!
insert image description here

Guess you like

Origin blog.csdn.net/qq_25404477/article/details/126102189