0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Warning: Some installed formulae are missing dependencies.

Posted at

事象 : brew doctorしたらなんか言われた

  • 環境
    • macOS Monterey バージョン12.0.1
    • Homebrew 3.3.1
$ brew doctor 
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae are missing dependencies.
You should `brew install` the missing dependencies:
  brew install python@3.9

Run `brew missing` for more details.

原因 : インストールされているものの依存関係にあるものがインストールされていないから

メッセージの雑な訳
警告:インストールされた数式の一部に依存関係がありません。
不足している依存関係を`brew install`する必要があります。
  brew install python@3.9
詳細については、`brew missing`を実行してください。
# Node.jsの依存関係にあるPythonがないみたい
$ brew missing
node: python@3.9

対応 : 不足しているものをインストールする

# インストールする
$ brew install python@3.9
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 87 formulae.

==> Downloading https://ghcr.io/v2/homebrew/core/python/3.9/manifests/3.9.7_1
Already downloaded: /Users/mananakai/Library/Caches/Homebrew/downloads/af2771e97438e64bf9091dbfae66186671053d07cba7f1a3feee33dcb8d17d80--python@3.9-3.9.7_1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.9/blobs/sha256:e775e8f427fad7d650c404e8e5ee5458a52119fba6210575
Already downloaded: /Users/mananakai/Library/Caches/Homebrew/downloads/e551587cb1698d4475d942f52c2ec95a1e8609d8ee0b6ef9dff4ef98535ee181--python@3.9--3.9.7_1.monterey.bottle.tar.gz
==> Pouring python@3.9--3.9.7_1.monterey.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3
Target /usr/local/bin/2to3
already exists. You may want to remove it:
  rm '/usr/local/bin/2to3'

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

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

Possible conflicting files are:
/usr/local/bin/2to3 -> /Library/Frameworks/Python.framework/Versions/3.8/bin/2to3
/usr/local/bin/idle3 -> /Library/Frameworks/Python.framework/Versions/3.8/bin/idle3
/usr/local/bin/pydoc3 -> /Library/Frameworks/Python.framework/Versions/3.8/bin/pydoc3
/usr/local/bin/python3 -> /Library/Frameworks/Python.framework/Versions/3.8/bin/python3
/usr/local/bin/python3-config -> /Library/Frameworks/Python.framework/Versions/3.8/bin/python3-config
==> /usr/local/Cellar/python@3.9/3.9.7_1/bin/python3 -m ensurepip
==> /usr/local/Cellar/python@3.9/3.9.7_1/bin/python3 -m pip install -v --no-deps --no-index --upgrade --isolated --target
==> Caveats
Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/python@3.9/libexec/bin

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.9/site-packages

tkinter is no longer included with this formula, but it is available separately:
  brew install python-tk@3.9

See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺  /usr/local/Cellar/python@3.9/3.9.7_1: 3,080 files, 54.6MB

# linkに失敗したようなので言われた通りディレクトリを削除して・・・
$ rm '/usr/local/bin/2to3'
# 強制上書きする
$ brew link --overwrite python@3.9

# 綺麗になった
$ brew doctor                     
Your system is ready to brew.
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?