Mac安装Homebrew

1.打开终端(terminal)
2.安装命令:

命令1:/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"(这个命令不好使会报错,如果报错尝试使用命令2)
命令2:/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"(这是一个脚本,同样可以安装Homebrew)

3.卸载命令:

$ cd `brew --prefix`
$ rm -rf Cellar
$ brew prune
$ rm `git ls-files`
$ rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions
$ rm -rf .git
$ rm -rf ~/Library/Caches/Homebrew

Homebrew的使用

1.查看Homebrew命令:brew help
2.安装任意包:brew install ,eg:brew install node
3.卸载任意包:brew uninstall ,eg:brew uninstall git
4.查询可用包:brew search
5.查询已安装包列表:brew list
6.查看任意包信息:brew info
7.更新Homebrew:brew update
8.Homebrew帮助信息:brew -h
8.查看brew版本:brew -v
10.更新brew版本:brew update
11.整理重复语句:open ~/.zshrc -e、open ~/.bash_profile -e

转载自:https://blog.csdn.net/weixin_41918841/article/details/112545539
作者:学海无涯乐做舟

Mac安装Homebrew

上一篇:Linux_用户和权限管理


下一篇:sql定时备份