아래의 homebrew 설치는 인텔칩 MacBook Pro에서 설치한 내용을 바탕으로 기록한다.
% brew -v
zsh: command not found: brew
자신의 macOS에 설치되어 있다면 설치된 homebrew의 version을 확인할 수 있다.
% brew -v
Homebrew 3.5.4
Homebrew/homebrew-core (git revision b765c617d32; last commit 2022-07-06)
homebrew에 있는 아래의 명령어를 복사하여 terminal에 입력한다.
% /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
error: Not a valid ref: refs/remotes/origin/master
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.
homebrew community에서 검색을 동일한 오류를 찾았고, 아래와 같이 터미널에 입력하였다.
% brew tap homebrew/core
==> Homebrew has enabled anonymous aggregate formula and cask analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
No analytics have been recorded yet (nor will be during this `brew` run).
Running `brew update --auto-update`...
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 1224134, done.
remote: Counting objects: 100% (202/202), done.
remote: Compressing objects: 100% (96/96), done.
remote: Total 1224134 (delta 114), reused 192 (delta 106), pack-reused 1223932
Receiving objects: 100% (1224134/1224134), 495.09 MiB | 777.00 KiB/s, done.
Resolving deltas: 100% (844377/844377), done.
Updating files: 100% (6500/6500), done.
Tapped 3 commands and 6169 formulae (6,511 files, 542.6MB).
% /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
==> Checking for `sudo` access (which may request your password)...
Password:
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
Press RETURN/ENTER to continue or any other key to abort:
==> /usr/bin/sudo /usr/sbin/chown -R seony:admin /usr/local/Homebrew
==> Downloading and installing Homebrew...
Updating files: 100% (2799/2799), done.
HEAD is now at 976681134 Merge pull request #13517 from Rylan12/fix-on-macos-version-on-linux
==> 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 (nor will any 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
% brew install cask
Running `brew update --auto-update`...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
... 중간 생략 ...
==> Installing cask
==> Pouring cask--0.8.8.all.bottle.tar.gz
==> Caveats
Emacs Lisp files have been installed to:
/usr/local/share/emacs/site-lisp/cask
==> Summary
🍺 /usr/local/Cellar/cask/0.8.8: 13 files, 152KB
==> Running `brew cleanup cask`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
==> cask
Emacs Lisp files have been installed to:
/usr/local/share/emacs/site-lisp/cask
% brew list
==> Formulae
bdw-gc emacs guile libidn2 libunistring p11-kit
ca-certificates gettext jansson libnghttp2 m4 pkg-config
cask gmp libevent libtasn1 nettle readline
coreutils gnutls libffi libtool openssl@1.1 unbound