MirrorNest
← すべてのガイド

Homebrew on MacOS

The de facto package manager for MacOS -- installs command-line tools and apps that Apple doesn't ship, via a single terminal command.

対象: MacOS (Intel or Apple Silicon)Package ManagerDevelopment公式ホームページ ↗公式ドキュメント ↗
このガイドは上記リンク先にあるHomebrew on MacOS公式ドキュメントをもとに作成されています。ディストリビューションやプロジェクトのバージョンは時間とともに変わるため、本番サーバーでこれらのコマンドを実行する前に、必ず公式ドキュメントで正確なパッケージ名・バージョン名を確認してください。
  1. 1Run the official install script

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

    This requires Xcode Command Line Tools, which the script offers to install automatically if missing.

  2. 2Add Homebrew to your shell PATH

    On Apple Silicon Macs, Homebrew installs to /opt/homebrew, which isn't on PATH by default -- the installer prints the exact lines to add, normally this:

    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
    eval "$(/opt/homebrew/bin/brew shellenv)"

    Intel Macs use /usr/local instead, where Homebrew was already on the default PATH -- this step is only needed on Apple Silicon.

  3. 3Verify the install

    brew doctor
    brew --version