mac brew

Last updated on September 15, 2024 pm

🧙 Questions

mac安装brew

☄️ Ideas

下载brew

走vpn,使用日本节点

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

设置环境变量,否则无法获取brew命令

(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/ispong/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
安装brew(gitee可选)

如果无法访问github,使用gitee下载

/bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)"
切换阿里镜像(可选)
cd "$(brew --repo)"
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
brew update
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc

常用软件安装

brew install wget
brew install unzip
brew install docker --cask

常用命令

查看已安装程序
brew list
搜索可安装程序
brew search hadoop
更新库
brew update --auto-update
清理旧的安装包
brew cleanup
卸载软件
brew remove adoptopenjdk/openjdk/adoptopenjdk8
更新软件
brew upgrade

mac brew
https://ispong.isxcode.com/os/mac/mac brew/
Author
ispong
Posted on
February 11, 2023
Licensed under