問題描述
解決方法一
添加安全目錄,沒有測試。
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask
解決方法二
取消掛載這兩個包,沒有測試。文章來源:http://www.zghlxwxcb.cn/news/detail-680837.html
brew untap homebrew/core
brew untap homebrew/cask
解決方法三
重裝brew到/opt下。注意,可能要點方法才能訪問到github。測試有效。文章來源地址http://www.zghlxwxcb.cn/news/detail-680837.html
sudo rm -rf /usr/local/Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
到了這里,關(guān)于【踩坑】三種方式解決 Homebrew failing to install - fatal: not in a git directory的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!