๋์ ๋ ธํธ๋ถ์ ์ธํ ๋งฅ๋ถ์ธ๋ฐ ํ์ฌ์์ ์๋ก๋ฐ์ ๋งฅ๋ถ์ 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]