标签:命令 src user brew ssl https content file wget homebrew
Homebrew是一个包管理器,它将软件包安装到/usr/local/Cellar目录中,并在/usr/local/bin中创建符号链接,类似于Debian/Ubuntu系列的apt和Redhat/Fedora系列的yum
在终端里执行
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
按回车继续
出现了这两条报错
解决办法:sudo chown -R aaron(你的用户名称):staff *
终端输入brew doctor
检查一下
安装成功,会自动创建目录 /usr/local/Cellar来存放Homebrew安装的程序。
常用命令
搜索软件:brew search 软件名,如:brew search python
安装软件:brew install 软件名,如:brew install python
卸载软件:brew remove 软件名,如:brew remove wget
查询已安装的软件:brew list
这里选的是清华源:https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/
更换homebrew
cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
brew update
更换homebrew-bottles
# bash
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
# zsh
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc
标签:命令 src user brew ssl https content file wget homebrew
原文地址:https://www.cnblogs.com/kangyuqi/p/11432361.html