새로 맥북을 구매한 후에 git을 설치하기 위해서 homebrew 명령어를 입력했는 데 "zsh command not found brew" 오류가 발생한다면 다음과 같은 절차로 재설치를 해야 합니다.
디렉터리 이동(opt 하위에 homebrew 디렉터리를 생성한 후 설치할 예정)
cd /opt
homebrew 디렉터리 생성
sudo mkdir homebrew
디렉터리 권한부여
sudo chown -R $(whoami) /opt/homebrew
homebrew 다운로드 및 압축해제
curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
homebrew 시스템 변수 경로 설정
echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc
설치 스크립트 실행
/bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/nrubin29/bea5aa83e8dfa91370fe83b62dad6dfa/raw/48f48f7fef21abb308e129a80b3214c2538fc611/homebrew_m1.sh)"
* 그리고 homebrew와 git을 설치하는 과정에서 오류 발생 시 아래 명령어도 사용하였습니다.
xcode-select --install
참고 링크 : gist.github.com/nrubin29/bea5aa83e8dfa91370fe83b62dad6dfa
'Life > TIP' 카테고리의 다른 글
인텔리제이 Test 실행시간 단축을 위한 기본 설정 (0) | 2021.05.02 |
---|---|
Bootstrap 디자인 구매 사이트 (0) | 2016.11.13 |