본문 바로가기

Tools/Homebrew

[Mac] Homebrew 설치

반응형

맥을 새로 바꾸는 바람에 개발환경을 다시 조성하게 되었습니다.
오랜만에 개발환경 조성을 하는 김에 내용을 정리해 보고자 합니다.

Homebrew 의 설치

https://brew.sh/
홈브루의 홈페이지에 들어가면 아래의 화면이 나옵니다.

 

Homebrew

The Missing Package Manager for macOS (or Linux).

brew.sh

 

화면에 보이는 인스톨 커멘드를 터미널에 입력을 해 줍니다.

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

커멘드를 입력을 하면 아래와 같은 비밀번호 입력 메세지가 출력됩니다..

==> Checking for `sudo` access (which may request your password)...
Password:

맥의 비밀번호를 입력하시면 됩니다.

==> This script will install:
/opt/homebrew/bin/brew
/opt/homebrew/share/doc/homebrew
/opt/homebrew/share/man/man1/brew.1
/opt/homebrew/share/zsh/site-functions/_brew
/opt/homebrew/etc/bash_completion.d/brew
/opt/homebrew

Press RETURN/ENTER to continue or any other key to abort:

비밀번호를 입력하고 나면 인스톨할 항목들과 진행여부를 묻는 메세지가 출력됩니다.
계속 진행하기 위해 엔터키를 눌러줍시다.

==> /usr/bin/sudo /usr/sbin/chown -R juhyanglee:admin /opt/homebrew
==> Downloading and installing Homebrew...
==> Updating 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.
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics data has been sent yet (nor will any be during this install run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

==> Next steps:
- Run these commands in your terminal to add Homebrew to your PATH:
    echo >> /Users/juhyanglee/.zprofile
    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/juhyanglee/.zprofile
    eval "$(/opt/homebrew/bin/brew shellenv)"
- Run brew help to get started
- Further documentation:
    https://docs.brew.sh

무사히 인스톨이 진행되면 상기와 같은 메세지가 출력됩니다.

터미널에 홈브루의 페스를 설정하기 위해 next step에 출력된 커멘드를 입력을 해 줍시다.

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

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

이걸로 터미널에서 홈브루를 사용할 수 있게 되었습니다.
홈브루의 작동을 확인하기 위해 버전확인과 인스톨을 실행해 보겠습니다.

Homebrew 버전 확인 커멘드

brew --version

Homebrew 인스톨 커멘드

brew install <pakage name>

Homebrew 언인스톨 커멘드

brew uninstall <pakage name>

Homebrew 설치 패키지 확인

brew list

Homebrew 설치 패키지 업그레이드

모든 패키지 업그레이드

brew upgrade

특정 패키지 업그레이드

brew upgrade <pakage name>

Homebrew 최신 버전만 남기고 클린

brew cleanup <pakage name>
반응형

'Tools > Homebrew' 카테고리의 다른 글

HomeBrew~node 업그레이드 커멘드  (0) 2023.07.26