用终端 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

如图所示:
Could not link: /usr/local/etc/bash_completion.d/brew

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

相关文章:

  • 2021-07-17
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2021-10-09
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
猜你喜欢
  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
相关资源
相似解决方案