C.W.K.
Stream
Lesson 04 of 05 · published

Formulae, Casks, Bottles, Cellar, Taps

~12 min · homebrew, concepts, internals

Level 0초심자
0 XP0/55 lessons0/16 achievements
0/80 XP to next level80 XP to go0% complete

Homebrew 의 내부 어휘는 좀 동화적이야 — Cellar, formula, cask, bottle, tap, Keg — 그치만 모든 단어가 정확한 개념과 매핑돼. 이 단어들을 알면 brew 출력을 꼬아보지 않고 그냥 읽을 수 있어.

Formula 는 CLI 도구 / 라이브러리 install 방법을 적은 Ruby 파일. homebrew-core tap 에 살아. Cask 는 비슷한데 macOS GUI 앱 install 을 적은 거 — homebrew-cask 에 살아. 같은 brew install 이 둘 다 처리하니까, 실용적 차이는 --cask 붙이느냐뿐.

Bottle 은 GitHub Container Registry 에 저장된 사전 컴파일된 바이너리 archive. brew install python 치면 거의 항상 bottle 받음 — Homebrew 가 사전 빌드된 바이너리 다운로드, Cellar 에 풀어, 끝. 몇 초. 너 macOS+arch 용 bottle 이 없으면 source 빌드 폴백 — 몇 분 ~ 몇 시간 걸릴 수 있음.

Cellar (/opt/homebrew/Cellar/) 는 모든 깔린 formula 가 물리적으로 사는 곳 — 각 formula 가 자기 버전별 서브디렉토리 받음 (예: git/2.45.0/). Homebrew 가 Cellar 에서 /opt/homebrew/bin/ 으로 symlink 만들어서 PATH 에 노출. Cellar 의 한 물리 디렉토리를 Keg 라고 불러.

Tap 은 추가 formulae / casks 의 git 저장소 — 더할 수 있는 third-party 컬렉션. 빌트인 두 tap (homebrew/core, homebrew/cask) 이 대부분 커버하지만, 폰트 / 니치 도구 / 벤더 전용 소프트웨어용 특수 tap 이 있어.

Code

Cellar 직접 들여다보기·bash
# 물리적 패키지가 사는 곳
ls /opt/homebrew/Cellar/
# git  python@3.12  ripgrep  postgresql@16  ...

# 각 formula 는 버전별 — 여러 버전 공존 가능
ls /opt/homebrew/Cellar/python@3.12/
# 3.12.4  3.12.5

# /bin 과 /lib 으로의 symlink 가 PATH 에 노출시키는 정체
ls -la /opt/homebrew/bin/python3.12
# -> ../Cellar/python@3.12/3.12.5/bin/python3.12
tap 추가, 거기서 install, untap·bash
# 예: Hashicorp tap 추가
brew tap hashicorp/tap

# 새 tap 에서 install
brew install hashicorp/tap/terraform

# tap 목록
brew tap

# tap 제거 (이미 깐 패키지는 안 지움)
brew untap hashicorp/tap

External links

Exercise

매일 쓰는 도구 하나 골라서 'brew info <도구>' 쳐. 출력 한 줄 한 줄 다 읽어. 찾아봐 — (1) 홈페이지 URL, (2) Cellar 안 install 경로, (3) 모든 caveats. 그 다음 Cellar 경로로 cd 해서 돌아봐 — Homebrew 가 깐 실제 파일들. Cellar 를 머릿속에서 demystify 하는 데 5분 가치 있어.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.