Homebrew 는 다양한 이유로 Intel 기반 과 M1 기반에서 다른 폴더에서 동작하고 있다.
# intel
╰─❯ which brew
/usr/local/bin/brew
# m1
╰─❯ which brew
/opt/homebrew/bin/brew
따라서 최초 M1 에서 homebrew 설치 시 기존 파일을 그대로 가져온 경우 migration 작업이 필요하다.
작업 순서는 다음과 같다.
brew bundle dump
#output is `Brewfile`
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# this command to .zshrc file
eval "$(/opt/homebrew/bin/brew shellenv)"'
brew bundle install --file /path/to/Brewfile