Homebrew Migration (Intel -> M1)

태빵·2023년 4월 15일
0

Homebrew 는 다양한 이유로 Intel 기반 과 M1 기반에서 다른 폴더에서 동작하고 있다.

# intel
╰─❯ which brew
/usr/local/bin/brew

# m1
╰─❯ which brew
/opt/homebrew/bin/brew

따라서 최초 M1 에서 homebrew 설치 시 기존 파일을 그대로 가져온 경우 migration 작업이 필요하다.

작업 순서는 다음과 같다.

  1. migration 리스트 작성
brew bundle dump

#output is `Brewfile`
  1. M1 기반의 homebrew 설치
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. M1 기반으로 동작하도록 shell config 수정
# this command to .zshrc file
eval "$(/opt/homebrew/bin/brew shellenv)"'
  1. M1 기반의 homebrew 에서 bundle 파일 인스톨
brew bundle install --file /path/to/Brewfile

Reference

profile
hello world

0개의 댓글