(MAC M1) brew 설치 오류

hwwwa·2022년 1월 28일

오류

  • macbook m1 모델을 사용하면서 터미널로 brew를 이용해 프로그램을 설치하다 다음과 같은 오류 발생
Error: Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)!
To rerun under ARM use:
    arch -arm64 brew install ...
To install under x86_64, install Homebrew into /usr/local.

해결 방법

  • brew 명령어 앞에 arch -arm64 추가
$ arch -arm64 brew install <package name>

oh-my-zsh 날려버리고 starship으로 갈아타려는데 설치가 안돼서 starship한테 입구컷 당한줄~

starship이 rust로 만들어져서 그렇게 빠르다는 소식,, 다덜 starship으로 넘어오세욥

starship 설치 방법

  1. 최근 버전 다운받기
$ sh -c "$(curl -fsSL https://starship.rs/install.sh)"
  1. Homebrew를 통해 패키지 매니저 설치
$ brew install starship
  • m1 mac은 아래 명령어 사용
$ arch -arm64 brew install starship
  1. 원하는 config file에 init script 추가
  • bash: ~/.bashrc 파일을 열고 아래의 코드 추가
eval "$(starship init bash)"
  • fish: ~/.config/fish/config.fish 파일을 열고 아래의 코드 추가
starship init fish | source
  • zsh: ~/.zshrc 파일을 열고 아래의 코드 추가
eval "$(starship init zsh)"

0개의 댓글