運行
$brew doctor
可查看失敗原因。
homebrew-core 和homebrew-cash失敗,則試著運行
$git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" fetch --unshallow
$git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask" fetch --unshallow
如果上面不行,請嘗試:
$cd /usr/local/Homebrew/Library/Taps/homebrew/
$rm -rf homebrew-core
$git clone https://github.com/Homebrew/homebrew-core.git
如果更新homebrew-core還是失敗,請嘗試
$brew update-reset
如果報錯443之類,請?zhí)鎿Qgit源。友情鏈接
http://www.lxweimin.com/p/b26c7bc14440
https://www.cnblogs.com/sanmubai/p/13160791.html
安裝homebrew,請參考
https://cloud.tencent.com/developer/article/1759415
如果還是有問題,可與我聯(lián)系。