brew 安装时报错fatal: not in a git directory Error: Command failed with exit 128: git

340 阅读1分钟

用Mac 的brew 安装ffmpeg等工具时会遇到如下图所示的报错

Screen Shot 2023-05-11 at 14.07.30.png ==> Installing ffmpeg dependency: brotli

==> **Installing ffmpeg dependency:** **brotli**

fatal: not in a git directory

Error: Command failed with exit 128: git

解决方法:

执行:

brew doctor

把warning里面的提示命令行逐个输入进去,再重新brew install就可以解决啦

Screen Shot 2023-05-11 at 14.10.03.png