티스토리 뷰

Apple

Apple Mac M2 Pro | Homebrew + Git 설치하기

doyeonjeong_ 2024. 3. 5. 10:03

 

새 맥북에 Xcode 설치했더니 Git 설정이 안되어있다.

 

 

 

다운로드 받을게 많다 ..! 두근두근

차근차근 글로 남겨놔야징


1. Git 홈페이지 방문

https://git-scm.com/download/mac

 

Git - Downloading Package

Download for macOS There are several options for installing Git on macOS. Note that any non-source distributions are provided by third parties, and may not be up to date with the latest source release. Choose one of the following options for installing Git

git-scm.com

 

 

brew install ? 아직 안깔려있음ㅋ


2. Homebrew 홈페이지 방문

https://brew.sh/ko/

 

Homebrew

The Missing Package Manager for macOS (or Linux).

brew.sh

 

 

저거 누르면 복사됨

업데이트되면 바뀌니까 홈페이지 가서 복사하시는 것을 추천

 


3. Homebrew 설치

 

터미널에 코드 복붙하면

이럴줄 알았음 ㅋ

애플 실리콘은 이런 오류가 자주 납니다..

대 AI시대니까 챗지피티한테 물어보면됨ㅋ

 

 

주요 경고 메세지 해석!

Warning: /opt/homebrew/bin is not in your PATH.
  Instructions on how to configure your shell for Homebrew
  can be found in the 'Next steps' section below.
🤖 : 이 경고는 Homebrew가 설치된 경로가 현재 사용자의 PATH에 포함되어 있지 않다는 것을 나타냅니다. PATH에 없는 경우 Homebrew 명령어를 직접 사용할 수 없습니다. PATH에 경로를 추가하여 이 문제를 해결할 수 있습니다.

 

 

해결 방법

1. 먼저, 터미널을 열고 다음 명령어를 실행하여 홈브루가 설치된 위치를 확인

which brew

 

2. 확인된 경로를 사용하여 PATH를 업데이트, 로그에 나와있는 경로를 사용

(아래 명령어는 .zprofile 파일에 경로를 추가하는 방법임)

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile

 

3. PATH 변경을 적용하기 위해 다음 명령어를 실행

source ~/.zprofile

 

4. 아래 코드로 정상적으로 설치 됐는지 확인

brew help


4. Homebrew 로 git 설치

 

brew install git

 

끝~!

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/06   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
글 보관함