为什么我所有的 Homebrew 包突然 "unlinked";我该如何解决?

Why are all my Homebrew packages suddenly "unlinked"; how do I fix that?

最近 brew doctorbrew upgrade --all(我不确定是哪一个,我在脚本中 运行 它们)报告了以下内容:

Homebrew from 5371359 to e3fe270.
Updated 3 taps (caskroom/cask, homebrew/boneyard, homebrew/core).
Error: Could not symlink bin/dvipdf
Target /usr/local/bin/dvipdf
already exists. You may want to remove it:
  rm '/usr/local/bin/dvipdf'

To force the link and overwrite all conflicting files:
  brew link --overwrite ghostscript

To list all files that would be deleted:
  brew link --overwrite --dry-run ghostscript
Error: Could not symlink bin/easy_install
Target /usr/local/bin/easy_install
already exists. You may want to remove it:
  rm '/usr/local/bin/easy_install'

To force the link and overwrite all conflicting files:
  brew link --overwrite python

To list all files that would be deleted:
  brew link --overwrite --dry-run python:

我遵循了 运行ning 的这些说明:

 brew link --overwrite python
 brew link --overwrite ghostscript

但现在每当我 运行 brew doctor 得到:

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
    # A list of EVERYTHING listed by brew list

即:brew doctor 现在显示 我安装的所有内容 brew list 列出的所有内容 — 显示为未链接!

这是怎么回事?为什么我用 Homebrew 安装的所有东西都突然取消链接了?他们是怎么走上这条路的?我可以(安全地)做什么来修复我的 Homebrew 安装(除了手动 运行ning brew link --overwrite ... 单独对我安装的每个东西?

运行 brew update(必要时两次)应该解决这个问题。

如果没有,brew unlink $(brew list); brew link $(brew list) 会。