Mac M1 git set

๊น€์Šนํ›ˆยท2021๋…„ 8์›” 16์ผ
0

๋‚˜์˜ ๋…ธํŠธ๋ถ์€ ์ธํ…” ๋งฅ๋ถ์ธ๋ฐ ํšŒ์‚ฌ์—์„œ ์ƒˆ๋กœ๋ฐ›์€ ๋งฅ๋ถ์€ m1์ด์–ด์„œ ํ™˜๊ฒฝ์„ธํŒ…์„ ํ•˜๊ณ  git์„ ์„ค์น˜ ์ค‘์— ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜์˜€๋‹ค. M1 ๋งฅ๋ถ์€ ์ด๋ ‡๊ฒŒ ์„ค์น˜ ํ•ด์•ผํ•œ๋‹ค๊ณ  ํ•œ๋‹ค.

๐Ÿบ Homebrew

Mac์—์„œ ๋งŽ์€ ๋„๊ตฌ / ํ”„๋กœ๊ทธ๋žจ์„ ์„ค์น˜ํ•  ๋•Œ ๊ต‰์žฅํžˆ ๋งŽ์ด ์‚ฌ์šฉ๋˜๋Š” ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ ํ”„๋กœ๊ทธ๋žจ์ด๋‹ค.

๐Ÿ“œ homebrew_m1.sh ํŒŒ์ผ ๋‚ด์šฉ

# We'll be installing Homebrew in the /opt directory.
cd /opt

# Create a directory for Homebrew. This requires root permissions.
sudo mkdir homebrew

# Make us the owner of the directory so that we no longer require root permissions.
sudo chown -R $(whoami) /opt/homebrew

# Download and unzip Homebrew. This command can be found at https://docs.brew.sh/Installation.
curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew

# Add the Homebrew bin directory to the PATH. If you don't use zsh, you'll need to do this yourself.
echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc

๐Ÿ› ๏ธ ํ”„๋กœ๊ทธ๋žจ ์„ค์น˜ / ์‚ญ์ œ

์นฉ์…‹์ด ๋‹ค๋ฅธ M1 macbook ๊ฐ™์€ ๊ฒฝ์šฐ Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew) ๋ผ๋Š” ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ๋‹ค.
์ด๋•Œ๋Š” brew ์•ž์— arch -arm64 ๋ฅผ ๊ฐ™์ด ์ž‘์„ฑํ•˜์—ฌ ์„ค์น˜๋ฅผ ์‹œ๋„ํ•œ๋‹ค.

# ์„ค์น˜
brew install [packege or program]

# Rosetta2 ๊ด€๋ จ ์—๋Ÿฌ ๋ฐœ์ƒ ์‹œ
arch -arm64 brew install [packege or program]

# ์‚ญ์ œ
brew uninstall [packege or program]

0๊ฐœ์˜ ๋Œ“๊ธ€