Post

Mac์— ๐Ÿบ Brew ์„ค์น˜ํ•˜๊ธฐ (+ rudy ์„ค์น˜ ํฌํ•จ)

์˜ˆ์ „์—๋Š” ๊ทธ๋ƒฅ ๋์—ˆ๋˜๊ฒƒ ๊ฐ™์€๋ฐ,.. ์ƒˆ ๋งฅ๋ถ์—์„œ brew ์ปค๋งจ๋“œ๋ฅผ ์“ฐ๋ ค๊ณ  ํ–ˆ๋”๋‹ˆ ์•„์˜ˆ brew๊ฐ€ ์„ค์น˜๋˜์–ด ์žˆ์ง€ ์•Š์•˜๋‹ค. ์„ค์น˜ํ•ด์ฃผ์ž

Brew installation

Brew home page

ํ„ฐ๋ฏธ๋„์„ ์—ด๊ณ  ์•„๋ž˜ ์ฝ”๋“œ๋ฅผ ๊ฐ–๋‹ค๋ถ™์—ฌ์ฃผ๋ฉด ์•Œ์•„์„œ ์„ค์น˜๋œ๋‹ค. ์ค‘๊ฐ„์— ์„ค์น˜ ์œ„์น˜๋ฅผ ์ปจํŽŒ๋ฐ›์„ํ…๋ฐ ๋ณ„์ผ ์—†์œผ๋ฉด ์—”ํ„ฐ ๋ˆ„๋ฅด์ž.

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

์„ค์น˜ ์ดํ›„์— ๊ฒฝ๋กœ๋ฅผ ์„ค์ •ํ•ด์ค€๋‹ค.

1
2
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/SC/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Ruby installation

์„ค์น˜ํ•œ brew์‚ฌ์šฉํ•ด์„œ ruby ๋„ ๊น”์•„์ฃผ์ž.

1
2
3
4
5
6
7
8
9
# installation
brew install ruby

# path
echo 'export PATH="/opt/homebrew/opt/ruby/bin:$PATH"' >> ~/.zshrc

# ์ถ”๊ฐ€์ ์œผ๋กœ ์„ค์น˜ํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์—์„œ ruby๋ฅผ ์žก์„ ์ˆ˜ ์žˆ๊ฒŒ ํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด.. 
echo 'export LDFLAGS="-L/opt/homebrew/opt/ruby/lib"'  >> ~/.zshrc
echo 'export CPPFLAGS="-I/opt/homebrew/opt/ruby/include"'  >> ~/.zshrc

๋!

This post is licensed under CC BY 4.0 by the author.

ยฉ Subin Cho. Some rights reserved.

Using the Chirpy theme for Jekyll.