Appleシリコン搭載のMacにHomebrewをインストール

AppleSillicon搭載のMacにHomebewをインストールする手順を説明する。

筆者の環境

  • Mac mini (M1, 2020)
  • OS Big Sur (バージョン 11.2.2)

ここでは次の手順で説明する。

  1. Rosetta2の使用
  2. Homebrewのインストール
  3. Homebewを使ったパッケージのインストール

Rosetta2の使用

Homebewの公式サイトトップ画面にある下記コマンドでインストールを試みると、”ARMプロセッサはサポート外、Rosetta2 の元でHomebrewをインストールせよ”とメッセージが表示し、インストールに失敗した。


user@hogenoMac-mini ~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Password:
Homebrew is not (yet) supported on ARM processors!
Rerun the Homebrew installer under Rosetta 2.
If you really know what you are doing and are prepared for a very broken
experience you can use another installation option for installing on ARM:
  https://docs.brew.sh/Installation
user@hogenoMac-mini ~ % 

そこで、Rosetta2 を使用するようターミナルを設定した。方法はAppleシリコン搭載のMacターミナルでRosettaを使用する方法にある。

Homebrewのインストール

再度インストールを実施、成功した。

user@hogenoMac-mini ~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
==> Checking for `sudo` access (which may request your password).
Password:
==> This script will install:
/
Done with Command Line Tools for Xcode
Done.
==> /usr/bin/sudo /bin/rm -f /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
==> /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools
==> Downloading and installing Homebrew...
remote: Enumerating objects: 63, done.
remote: Counting objects: 100% (63/63), done.
remote: Compressing objects: 100% (62/62), done.
remote: Total 175619 (delta 6), reused 47 (delta 0), pack-reused 175556
Receiving objects: 100% (175619/175619), 45.78 MiB | 12.34 MiB/s, done.
Resolving deltas: 100% (130351/130351), done.
From https://github.com/Homebrew/brew
 * [new branch]      dependabot/bundler/Library/Homebrew/sorbet-0.5.6287 -> origin/dependabot/bundler/Library/Homebrew/sorbet-0.5.6287
 * [new branch]      master                                              -> origin/master
 * [new tag]             0.1                                                 -> 0.1
(省略)
 * [new tag]             3.0.2                                               -> 3.0.2
HEAD is now at 236c622b2 Merge pull request #10734 from Homebrew/sorbet-files-update
==> Tapping homebrew/core
remote: Enumerating objects: 26, done.
remote: Counting objects: 100% (26/26), done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 917512 (delta 14), reused 0 (delta 0), pack-reused 917486
Receiving objects: 100% (917512/917512), 369.53 MiB | 14.82 MiB/s, done.
Resolving deltas: 100% (625915/625915), done.
From https://github.com/Homebrew/homebrew-core
 * [new branch]      master     -> origin/master
HEAD is now at 0121d46887 squirrel: update livecheck
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics data has been sent yet (or will be during this `install` run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

==> Next steps:
- Run `brew help` to get started
- Further documentation: 
    https://docs.brew.sh
user@hogenoMac-mini ~ % 

Homebrewのバージョンを確認。


user@hogenoMac-mini ~ % brew --version
Homebrew 3.0.2
Homebrew/homebrew-core (git revision 0121d; last commit 2021-02-28)
user@hogenoMac-mini ~ % 

brew updateを実行し、最新の状態であることを確認した。


user@hogenoMac-mini ~ % brew update
Already up-to-date.
user@hogenoMac-mini ~ % 

Homebewを使ったパッケージのインストール

brewを使ってパッケージをインストールする。下記コマンドでインストールを実行する。


brew install パッケージ名

筆者の環境にInkscapeをインストールした記録は、Appleシリコン搭載のMacにInkscapeをインストールにある。

パッケージの情報を確認する場合は、下記のようにinfoオプションを用いる。パッケージのインストール前でも確認可能である。


brew info パッケージ名

以上

スポンサーリンク

シェアする

  • このエントリーをはてなブックマークに追加

フォローする