執行如下命令時
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
報錯:
==> Downloading and installing Homebrew... HEAD is now at 8175e404e Merge pull request #7942 from sjackman/bottle_tag error: Not a valid ref: refs/remotes/origin/master fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.
這個錯誤是由於多次下載,導致一些沖突,最簡單粗暴的解決就是卸載重裝。因為我之前有幾次安裝中斷了。
卸載homebrew
下載https://raw.githubusercontent.com/Homebrew/install/master/uninstall 並保存為 uninstall.rb,再執行 ruby uninstall.rb
參考鏈接:
1. https://hyuga.top/blog/184
2. https://stackoverflow.com/questions/39836190/homebrew-install-failed-during-git-fetch-origin-masterrefs-remotes-origin-mas
