๐ŸŒฑ → ๐ŸŒณ

M1์นฉ Mac์—์„œ Homebrew ์˜ค๋ฅ˜ํ•ด๊ฒฐ ๋ณธ๋ฌธ

์นดํ…Œ๊ณ ๋ฆฌ ์—†์Œ

M1์นฉ Mac์—์„œ Homebrew ์˜ค๋ฅ˜ํ•ด๊ฒฐ

BAY 2022. 7. 30. 14:48
728x90

sass ์„ค์น˜๋ฅผ ์œ„ํ•ด brew์™€ node๋ฅผ ์„ค์น˜ํ–ˆ๋Š”๋ฐ 

์„ค์น˜๊ฐ€ ๋˜์—ˆ๋‹ค๊ณ  ๋œจ์ง€๋งŒ ํ„ฐ๋ฏธ๋„์„ ๊ป๋‹ค ํ‚ค๊ฑฐ๋‚˜ ์ƒˆ๋กœ์šด ํ„ฐ๋ฏธ๋„์—์„œ brew์™€ sass์˜ version์„ ํ™•์ธํ•˜๋ฉด 

zsh: command not found: brew

์ด ์˜ค๋ฅ˜ ๋ฉ”์‹œ์ง€๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค 

 

์ฒ˜์Œ์—๋Š” ๋ฒ„์ „๋ผ๋ฆฌ ์œ„์น˜๊ฐ€ ๊ผฌ์ธ ์ค„ ์•Œ๊ณ  homebrew, node.js, sass๋ฅผ ๋ชจ๋‘ uninstallํ›„ ์žฌ์„ค์น˜๋ฅผ ํ•˜์˜€์œผ๋‚˜ 

๋˜‘๊ฐ™์€ ์˜ค๋ฅ˜ ๋ฐœ์ƒ ,, ๐Ÿคฌ

 

๊ตฌ๊ธ€๋ง ํ•ด๋ณธ ๊ฒฐ๊ณผ ์ € ์˜ค๋ฅ˜ ๋ฉ”์‹œ์ง€๊ฐ€ ๋‚˜์˜ค๋ฉด

Homebrew๊ฐ€ /usr/local/... ๊ฐ€ ์•„๋‹Œ  /opt/homebrew/ ์— ์„ค์ •๋˜์–ด ์žˆ์–ด์„œ ๊ทธ๋ ‡๋‹ค๋Š” ๊ฒƒ์„ ์•Œ์•˜๋‹ค.

 

ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์€ ํ„ฐ๋ฏธ๋„์— ๋“ค์–ด๊ฐ€์„œ 

vi ~/.zshrc

๋กœ ๋“ค์–ด๊ฐ€์„œ 

export PATH=/opt/homebrew/bin:$PATH

์œ„์˜ ๋ช…๋ น์„ ์ถ”๊ฐ€ํ•˜๋ฉด ํ™ˆ ๋””๋ ‰ํ† ๋ฆฌ์˜ .zshrc ๋กœ ์„ค์ •ํ•ด ZSH shell ๊ฐ€ brew command๋ฅผ ์ฐพ์•„ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค.

 

์ด๋ ‡๊ฒŒ ํŽธ์ง‘ ํ•  ๊ฒฝ์šฐ, 

E45: 'readonly' option is set (add ! to override)

์ด๋Ÿฐ ์—๋Ÿฌ๋ฅผ ๋„์šฐ๋ฉฐ readonly ํŒŒ์ผ์ด๋ผ ์ €์žฅ๋˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ๋ผ๊ณ  ํ•  ์ˆ˜๋„ ์žˆ๋‹ค 

 

์ด๋•Œ๋Š” :wq์ด ์•„๋‹Œ,

:w! (๊ฐ•์ œ๋กœ ์ €์žฅํ•˜๊ธฐ) ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๊ฐ•์ œ๋กœ ์ €์žฅํ•˜์—ฌ ์ฃผ๋ฉด ๋œ๋‹ค.

 

์ฐธ๊ณ ,

:w (ํŽธ์ง‘ ๋œ ๋‚ด์šฉ์„ ์ €์žฅํ•˜๊ธฐ)

:q (ํŽธ์ง‘ํ•˜๊ธฐ ์œ„ํ•ด ์—ด์–ด ๋‘” ํ™”๋ฉด์„ ์ข…๋ฃŒํ•˜๊ธฐ)

 

์œ„์˜ ์ž‘์—…์„ ๋งˆ์น˜๋ฉด,

์ƒˆ๋กœ์šด ํ„ฐ๋ฏธ๋„์„ ๋„์šฐ๋”๋ผ๋„ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜์ง€ ์•Š๋Š” ๊ฒƒ์„ ํ™•์ธ ํ•  ์ˆ˜ ์žˆ๋‹ค.

 

ํ™•์ธ ๋ฐฉ๋ฒ•

brew -v
sass --version

 

728x90