프로그램(패키지) 설치
# brew를 최신 버전을 업데이트
brew update
# 설치 가능한 프로그램 검색
brew search PKG_NAME
# 프로그램 설치 [@VERSION]
brew install PKG_NAME @VERSION
# 패키지 업그레이드
brew upgrade PKG_NAME
# 모든 패키지 업그레이드
brew upgrade
정보 확인
# 설치된 프로그램 목록
brew list
# 패키지 정보 보기
brew info PKG_NAME
# 업그레이드 필요한 프로그램 찾기
brew outdated
설치된 패키지 삭제
# 최신 버전 이외의 버전 삭제
brew cleanup PKG_NAME
# 특정 패키지 삭제
brew uninstall PKG_NAME
Homebrew 설치하기
설치명령어 Terminal상에 붙여놓고 Homebrew 설치진행.(비밀번호 입력후 설치 진행)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew help 를 통하여 homebrew가 제대로 설치됐는지 확인
zsh: command not found : brew 에러시 아래의 명령어 입력
# 1
brew --version
zsh: command not found: brew
# zshrc에 homebrew path 추가
echo 'export PATH=/opt/homebrew/bin:$PATH' >> ~/.zshrc
# zshrc 반영
source ~/.zshrc
# 2
eval $(/opt/homebrew/bin/brew shellenv
설치 안되면
# 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
'AI공부 > 환경설정 및 cmd' 카테고리의 다른 글
맥북에서 GPU 가속하기 (0) | 2024.05.08 |
---|---|
conda command (0) | 2024.04.30 |