Rosetta 2는 기존의 Intel 아키텍처 기반의 소프트웨어를 Apple Silicon에서 실행할 수 있게 해주는 에뮬레이션 레이어입니다.
만약 이 메시지가 나타났다면, 아마 이미 Apple Silicon으로 설계된 네이티브 애플리케이션을 사용하고 있는 것이기 때문일 수 있습니다. Apple Silicon에서는 Intel용 소프트웨어를 실행하는 데 Rosetta 2가 자동으로 사용되기 때문에 별도로 설치할 필요가 없습니다.
Intel Mac과 Apple Silicon Mac은 Homebrew의 경로가 다릅니다.
이 경로는 기존에 Homebrew를 사용하여 설치한 경우입니다. 이전에는 macOS 시스템에 설치된 기본 경로로 /usr/local에 Homebrew가 설치되었습니다.
이 경로는 x86_64(인텔) 아키텍처를 사용하는 Mac에서 Homebrew를 설치한 경우가 많습니다.
Apple Silicon (M1) 기반의 Mac에서 Homebrew를 설치할 때 사용되는 경로입니다. Apple Silicon은 ARM 아키텍처를 사용하므로, 이에 최적화된 버전의 Homebrew를 사용하려면 /opt/homebrew와 같은 경로가 선택됩니다.
최신 버전의 Homebrew는 x86_64와 ARM 아키텍처에 모두 호환되므로, x86_64 아키텍처에서도 /opt/homebrew를 사용할 수 있습니다.
결과적으로 which brew 명령어의 결과가 /opt/homebrew/bin/brew 로 잡혀있어야 정상적으로 M1 Mac의 Brew가 작동합니다.
brew config
HOMEBREW_VERSION: 4.1.25
ORIGIN: https://github.com/Homebrew/brew
HEAD: c32bd1c7cc0c3b1b914845bddfeda53f4d877a3f
Last commit: 4 days ago
Core tap JSON: 11 Dec 15:20 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.1.4 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: 10-core 64-bit westmere
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.1.2 => /usr/bin/curl
macOS: 14.1.2-x86_64
CLT: 15.0.0.0.1.1694021235
Xcode: 14.2
Rosetta 2: true
/opt/homebrew/bin/brew doctor 명령어로 /usr/local → /opt/homebrew 변경을 시도 하려 하였으나 아래와 같은 warnig가 발생 하였다.
Warning: Your Homebrew's prefix is not /usr/local.
Many of Homebrew's bottles (binary packages) can only be used with the default prefix.
Consider uninstalling Homebrew and reinstalling into the default prefix.
It is expected behaviour that some formulae will fail to build in this unsupported configuration.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from Homebrew or its maintainers on social media.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.
Warning: Your Xcode (14.2) is too outdated.
Please update to Xcode 15.0 (or delete it).
Xcode can be updated from the App Store.
Warning: Your Xcode (14.2) is outdated.
Please update to Xcode 15.0 (or delete it).
Xcode can be updated from the App Store.
Homebrew를 삭제하고 재설치를 진행 하도록 한다.
sudo /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
homebrew 삭제중 아래 내용이 떠서 폴더를 다 삭제해 주었다.
주의해야 할것은 기존에 brew로 설치된 모든 의존성이 같이 삭제 되는거 같았다.
/usr/local/Homebrew/
/usr/local/bin/
/usr/local/etc/
/usr/local/include/
/usr/local/lib/
/usr/local/share/
/usr/local/var/
You may wish to remove them yourself.
brew --version
homebrew 삭제 후 터미널에 아래 내용의 문구가 표시 되어있었다.
/Users/유저명/.zprofile:6: no such file or directory: /usr/local/bin/brew
.zprofile 수정
vi ~/.zprofile
.zprofile에 들어가서 내용을 확인해 보니 지워준 /usr/local/bin/brew/bin/brew shellenv 명령어가 있어서 버그가 난거 같아 해당 내용을 삭제 해 주었다.
그리고 다시 아래 명령어를 입력 하였다.
brew config
brew config
HOMEBREW_VERSION: 4.1.24
ORIGIN: https://github.com/Homebrew/brew
HEAD: ab6a7ed5a122b6d4f9d441ef76c86032398ced5f
Last commit: 6 days ago
Core tap: N/A
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_REPOSITORY: /opt/homebrew
HOMEBREW_CELLAR: /opt/homebrew/Cellar
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: 10-core 64-bit westmere
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.1.2 => /usr/bin/curl
macOS: 14.1.2-x86_64
CLT: 15.0.0.0.1.1694021235
Xcode: 14.2
Rosetta 2: true
/opt/homebrew 경로로 정상적으로 사용할 수 있었다.