在brew update 或brew install某东东时出现下面的提示
$ brew update
Updated 1 tap (homebrew/core).==> Updated Formulae
libhttpseverywhere
Error: Could not link:
/usr/local/etc/bash_completion.d/brew
Please delete these paths and run `brew update`.
Error: Could not link:
/usr/local/share/zsh/site-functions/_brew
Please delete these paths and run `brew update`.
Error: Could not link:
/usr/local/share/man/man1/brew-cask.1
/usr/local/share/man/man1/brew.1
Please delete these paths and run `brew update`.
Error: Could not link:
/usr/local/share/doc/homebrew
Please delete these paths and run `brew update`.
图
解决办法是有几处路径Error 就全部rm -rf,如下
$ rm -rf /usr/local/share/doc/homebrew
$ rm -rf /usr/local/share/man/man1/brew-cask.1$ rm -rf /usr/local/share/man/man1/brew.1
$ rm -rf /usr/local/share/zsh/site-functions/_brew
$ rm -rf /usr/local/etc/bash_completion.d/brew
$ brew update
Already up-to-date.