自动化测试之路

Mac系统下安装/卸载brew(带踩坑)

2020-06-15  本文已影响0人  orange_ade

Homebrew是一个包管理器,用于在Mac上安装一些OSX上没有的UNIX工具(比如wget)。

/usr/bin/ruby -e "$(curl -fsSL [https://raw.githubusercontent.com/Homebrew/install/master/install](https://raw.githubusercontent.com/Homebrew/install/master/install))"
/usr/bin/ruby -e "$(curl -fsSL [https://raw.githubusercontent.com/Homebrew/install/master/uninstall](https://raw.githubusercontent.com/Homebrew/install/master/uninstall))"
安装软件,如:brew install oclint
卸载软件,如:brew uninstall oclint
搜索软件,如:brew search oclint
更新软件,如:brew upgrade oclint
查看安装列表, 如:brew list
更新Homebrew,如:brew update
使用brew安装wget:
brew install wget

秘籍一:使用wget更新hosts

wget [https://raw.githubusercontent.com/racaljk/hosts/master/hosts](https://raw.githubusercontent.com/racaljk/hosts/master/hosts) -qO /tmp/hosts && sudo sh -c 'cat /tmp/hosts > /etc/hosts'

参考链接:https://www.jianshu.com/p/5ef630c93cdb

安装完后,查看版本发现,居然提示我:-bash:brew:command not found
然后我开始了疯狂百度找答案,我就是按照教程安装的啊!怎么怎么会有问题?

最后我终于在CSDN里面找到了答案(这里不是打广告哈哈),下面就分享解决办法,快拿去快拿去

 /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
20200419152332189.png 20200419152355726.png
$ brew cask install docker
上一篇下一篇

猜你喜欢

热点阅读