ubuntu安装Homebrew完整版
需要在非root用户下安装,该用户还需要具备sudo权限
安装依赖环境
sudo apt install curl git build-essential -y
配置清华镜像源
cat>>~/.bashrc<<EOF
export HOMEBREW_API_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api"
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
export HOMEBREW_PIP_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple"
EOF
source ~/.bashrc
安装
git clone --depth=1 https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/install.git brew-install
bash brew-install/install.sh
设置环境变量
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> ~/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew的基本操作命令
# 更新
brew update
# 安装指定软件
brew install xxx
# 查看所有已安装软件
brew list
# 卸载指定软件
brew uninstall xxx
参考资料:
- 官网:Homebrew — The Missing Package Manager for macOS (or Linux)
- 清华大学镜像源:https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/
- github:raw.githubusercontent.com/Homebrew/install/master/install.sh
- 清华大学软件仓库:homebrew-bottles | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。