ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • ๋งฅ๋ถ Homebrew ํ™ˆ๋ธŒ๋ฅ˜ ์„ค์น˜ํ•˜๊ธฐ
    ๐Ÿ›  develop/Mac 2022. 4. 12. 17:55

    Homebrew ํ™ˆ๋ธŒ๋ฅ˜๋ž€?

    ์˜คํ”ˆ์†Œ์Šค ๊ธฐ๋ฐ˜์˜ Mac OS์šฉ ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €์ž…๋‹ˆ๋‹ค. ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €๋ž€ ์ปดํ“จํ„ฐ ํ”„๋กœ๊ทธ๋žจ์˜ ์„ค์น˜, ์—…๊ทธ๋ ˆ์ด๋“œ, ๊ตฌ์„ฑ, ์ œ๊ฑฐ ๊ณผ์ •์„ ์ž๋™ํ™”ํ•˜๋Š” ์†Œํ”„ํŠธ์›จ์–ด ๋„๊ตฌ๋“ค์˜ ๋ชจ์ž„์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.

     

    ์ฆ‰, Mac OS ์šด์˜ ์ฒด์ œ์˜ ์†Œํ”„ํŠธ์›จ์–ด ์„ค์น˜๋ฅผ ๋‹จ์ˆœํ•˜๊ฒŒ ๋งŒ๋“ค์–ด์ฃผ๊ธฐ ์œ„ํ•œ ํ”„๋กœ๊ทธ๋žจ์ž…๋‹ˆ๋‹ค.

     

    ํ™ˆ๋ธŒ๋ฅ˜๋Š” ์„ค์น˜๋ฅผ ๋‹จ์ˆœํ•˜๊ฒŒ ๋งŒ๋“ค์–ด ํŽธ๋ฆฌํ•˜๋‹ค๋Š” ์žฅ์ ์ด ์žˆ์ง€๋งŒ, ์˜คํ”ˆ์†Œ์Šค ๊ธฐ๋ฐ˜์ด๋ผ ํŒจํ‚ค์ง€ ์•ˆ์ •์„ฑ์ด ๋ณด์žฅ๋˜์ง€ ์•Š๋Š”๋‹ค๋Š” ๋‹จ์ ์ด ์กด์žฌํ•ฉ๋‹ˆ๋‹ค.

     

     

     

    ํ™ˆ๋ธŒ๋ฅ˜ ์„ค์น˜ํ•˜๊ธฐ

    1. ํ™ˆ๋ธŒ๋ฅ˜ ์‚ฌ์ดํŠธ ์ ‘์† ํ›„ Install Homebrew ๋ช…๋ น์–ด๋ฅผ ๋ณต์‚ฌํ•ด์ค๋‹ˆ๋‹ค.

     

    ํ™ˆ๋ธŒ๋ฅ˜ ์‚ฌ์ดํŠธ

    https://brew.sh/

     

    Homebrew

    The Missing Package Manager for macOS (or Linux).

    brew.sh

     

    ํ™ˆ๋ธŒ๋ฅ˜ ์‚ฌ์ดํŠธ์— ์ ‘์†ํ•˜์…”์„œ

     

    Install Homebrew ๋ฐ‘ ๋ช…๋ น์–ด๋ฅผ ๋ณต์‚ฌํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

     

     

    2. ํ„ฐ๋ฏธ๋„์— ๋ณต์‚ฌํ•œ ๋ช…๋ น์–ด ๋ถ™์—ฌ๋„ฃ๊ณ  ์—”ํ„ฐ๋ฅผ ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค.

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

    ์ดํ›„ Checking for 'sudo' access (which may request your password) ๋ผ์ธ์ด ๋‚˜์˜ค๋ฉด ๋‹นํ™ฉํ•˜์ง€ ๋งˆ์‹œ๊ณ , ๋งฅ๋ถ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. (๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด๋„ ํ™”๋ฉด์ฐฝ์—๋Š” ๋‚˜ํƒ€๋‚˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๊ทธ๋ƒฅ ์ž…๋ ฅํ•˜์‹œ๊ณ  ์—”ํ„ฐ ๋ˆ„๋ฅด์„ธ์š”.)

     

     

    3. ๊ฒฝ๋กœ ์„ค์ •ํ•˜๊ธฐ

    ์„ค์น˜๋ฅผ ์™„๋ฃŒ ํ–ˆ๋‹ค๋ฉด, ํ•˜๋‹จ์ชฝ Next steps ๋ถ€๋ถ„์— ๋‘ ์ค„์งœ๋ฆฌ ๋ช…๋ น์–ด ๋ผ์ธ์ด ๋ณด์ด์‹ค ๊ฒ๋‹ˆ๋‹ค.

    
    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/์‚ฌ์šฉ์ž์ด๋ฆ„/.zprofile
    eval "$(/opt/homebrew/bin/brew shellenv)"

    ํ•˜๋‚˜์”ฉ ๋ณต๋ถ™ํ•ด์„œ ์‹คํ–‰์‹œ์ผœ์ค๋‹ˆ๋‹ค.

     

     

    4. ์„ค์น˜ ํ™•์ธํ•˜๊ธฐ

    brew --version

    brew --version์„ ์ž…๋ ฅํ•˜๊ณ , ๋ฒ„์ „์ด ๋‚˜ํƒ€๋‚˜๋ฉด (2022.04.12 ๊ธฐ์ค€ 3.4.6) ์„ค์น˜ ์™„๋ฃŒ์ž…๋‹ˆ๋‹ค!

     

     

     

    ํ™ˆ๋ธŒ๋ฅ˜ ๊ธฐ๋ณธ ๋ช…๋ น์–ด

    1. ํ™ˆ๋ธŒ๋ฅ˜

    brew update - brew ์—…๋ฐ์ดํŠธ

    brew search <ํŒจํ‚ค์ง€ ์ด๋ฆ„> - ํ•ด๋‹น ํŒจํ‚ค์ง€ ๊ฒ€์ƒ‰

    brew install <ํŒจํ‚ค์ง€ ์ด๋ฆ„> - ํ•ด๋‹น ํŒจํ‚ค์ง€ ์„ค์น˜

     

    2. ํ™•์ธ

    brew list - ์„ค์น˜ ๋œ ํŒจํ‚ค์ง€ ๋ฆฌ์ŠคํŠธ ํ™•์ธ

    brew info <ํŒจํ‚ค์ง€ ์ด๋ฆ„> - ํ•ด๋‹น ํŒจํ‚ค์ง€ ์ƒ์„ธ ์ •๋ณด ํ™•์ธ

     

    3. ์—…๊ทธ๋ ˆ์ด๋“œ (์—…๋ฐ์ดํŠธ)

    brew outdated - ์—…๋ฐ์ดํŠธ๊ฐ€ ํ•„์š”ํ•œ ํŒจํ‚ค์ง€ ์ฐพ์•„๋ณด๊ธฐ

    brew upgrade - ํŒจํ‚ค์ง€ ์ „์ฒด ์—…๋ฐ์ดํŠธ

    brew upgrade <ํŒจํ‚ค์ง€ ์ด๋ฆ„> - ํ•ด๋‹น ํŒจํ‚ค์ง€ ์—…๋ฐ์ดํŠธ

     

    4. ์‚ญ์ œ

    brew cleanup <ํŒจํ‚ค์ง€ ์ด๋ฆ„> - ์—ฌ๋Ÿฌ ๊ฐœ์˜ ๋ฒ„์ „์ด ์žˆ์„ ๋•Œ, ๊ฐ€์žฅ ์ตœ์‹  ๋ฒ„์ „๋งŒ ์‚ด๋ฆฌ๊ณ  ๋‚˜๋จธ์ง€๋Š” ์‚ญ์ œ

    brew uninstall <ํŒจํ‚ค์ง€ ์ด๋ฆ„> - ํ•ด๋‹น ํŒจํ‚ค์ง€ ์‚ญ์ œ

     

    +) ํ™ˆ๋ธŒ๋ฅ˜ ์™„์ „ ์‚ญ์ œ

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

    ๋Œ“๊ธ€