Could not link: /usr/local/etc/bash_completion.d/brew

用终端 brew updatebrew install ** 时遇到的问题,详细如下:

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.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: You must `brew link autoconf makedepend` before pyenv can be installed

如图所示:

解决办法是有几处路径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

PS: 其实提示中也把解决方法说了出来,即删除相应的目录,然后再运行 brew update

posted @ 2017-04-20 14:37  WriteOnRead  阅读(700)  评论(0编辑  收藏  举报