写点什么

Mac 使用 brew install zsh 遇到 Error: Command failed with exit 128: git

作者:24号工程师
  • 2023-02-15
    浙江
  • 本文字数:527 字

    阅读完需:约 2 分钟

使用 brew 安装 zsh 时出现错误代码如下:

sfatal: not in a git directoryError: Command failed with exit 128: git
复制代码

解决方法:

# 执行命令brew doctor
复制代码

得到提示

Please note that these warnings are just used to help the Homebrew maintainerswith debugging if you file an issue. If everything you use Homebrew for isworking fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Suspicious https://github.com/Homebrew/brew git origin remote found.The current git origin is: https://mirrors.ustc.edu.cn/brew.git
With a non-standard origin, Homebrew won't update properly.You can solve this by setting the origin remote: git -C "/opt/homebrew" remote set-url origin https://github.com/Homebrew/brew
Warning: Homebrew/homebrew-cask was not tapped properly! Run: rm -rf "/opt/homebrew/Library/Taps/homebrew/homebrew-cask" brew tap homebrew/cask
Warning: Homebrew/homebrew-core was not tapped properly! Run: rm -rf "/opt/homebrew/Library/Taps/homebrew/homebrew-core" brew tap homebrew/core
复制代码

根据 brew doctor 提示,依次执行命令,解决问题!

发布于: 刚刚阅读数: 5
用户头像

还未添加个人签名 2020-10-14 加入

还未添加个人简介

评论

发布
暂无评论
Mac 使用brew install zsh 遇到 Error: Command failed with exit 128: git_brew_24号工程师_InfoQ写作社区