Mac에서 Brew Install을 실행할 때 오류: 명령이 종료 128로 실패했습니다: git

오류는 다음과 같이 보고됩니다.

fatal: not in a git directory
Error: Command failed with exit 128: git

복구 코드 실행

여기에 이미지 설명을 삽입하세요.
다운로드한 파일의 용량이 크고 외국인 웹사이트에 있으므로 다음 코드를 순차적으로 실행하면 속도가 느려집니다.

git -C "/opt/homebrew" remote set-url origin https://github.com/Homebrew/brew
rm -rf "/opt/homebrew/Library/Taps/homebrew/homebrew-cask"
brew tap homebrew/cask
rm -rf "/opt/homebrew/Library/Taps/homebrew/homebrew-core"
brew tap homebrew/core

추천

출처blog.csdn.net/Fine_Cui/article/details/126480494