OS/Mac(M1)

[mac] homebrew 설치 및 확인 방법

달별선장 2023. 8. 19. 06:33
728x90

1. homebrew 설치

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

 

2. homebrew 환경 설정

설치가 완료되면 다음과 같은 에러가 뜬다.

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.

이때 Next steps 를 따라가보면 아래와 같이 입력하라는 안내가 되어 있다.

==> Next steps:
- Run these two commands in your terminal to add Homebrew to your PATH:
    (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/gayeong/.zprofile
    eval "$(/opt/homebrew/bin/brew shellenv)"

아래 방법으로 진행하면 된다.

사용자 이름은 Users 폴더에서 ls 했을 때 나오는 사용자명을 입력하면 된다.

$ echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/사용자이름/.zprofile
$ source /Users/사용자이름/.zprofile

$ echo 'eval "$(/opt/homebrew/bin/brew shellenv)"'

 

3. brew 설치 확인

$ brew -v

결과 :

Homebrew 3.6.21

 

728x90