admin avatar

brew error: Not a valid ref: refs/remotes/origin/master的解决方法

🕜 by admin

执行brew update时出现了下面的错误

1
2
3
error: Not a valid ref: refs/remotes/origin/master
fatal: Could not resolve HEAD to a revision
Already up-to-date.
解决方法如下

1
2
3
4
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
git fetch --prune origin
git pull --rebase origin master
brew install 

搞定了~

💘 相关文章

写一条评论