1. 程式人生 > >關於Homebrew的一些錯誤總結

關於Homebrew的一些錯誤總結

今天使用Homebrew時出現了一些錯誤,解決之後就記錄了下來:

1.Brew update failed

描述:

Error: Failed while executing git pull

解決辦法:解除安裝Homebrew,重新安裝。

解除安裝:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

安裝:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)
"

2.安裝Homebrew,出現一下錯誤:

It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

但是解除安裝Homebrew時,提示Failed to locate Homebrew!,但是執行$ brew update

命令時,提示brew: command not found

解決辦法:

先刪除/usr/local下的.gitCellar資料夾,然後安裝Homebrew即可。