mac安装 Homebrew

1.使用指令安装brew

/usr/bin/ruby -e "$(curl -fsSL[https://raw.githubusercontent.com/Homebrew/install/master/install)"]      
                  (https://raw.githubusercontent.com/Homebrew/install/master/install)%22)

2.Homebrew 安装软件

brew install wget

3.Homebrew 会将软件包安装到独立目录,并将其文件软链接至 /usr/local

cd /usr/local
find Cellar
Cellar/wget/1.16.1
Cellar/wget/1.16.1/bin/wget
Cellar/wget/1.16.1/share/man/man1/wget.1
ls -l bin
bin/wget -> ../Cellar/wget/1.16.1/bin/wget

4.使用brew安装软件

brew install git

5.使用brew查询软件

brew search /wge*/----查询brew上有的版本
brew list                  —列出已安装的软件
brew update            —更新Homebrew
brew home             *—用浏览器打开
brew info                *—显示软件内容信息
brew deps              * —显示包依赖
brew server           *  —启动web服务器,可以通过浏览器访问http://localhost:4567/ 来同网页来管理包
brew -h brew            —帮助

卸载命令

cd `brew –prefix`
rm -rf Cellar
brew prune
rm `git ls-files`
rm -rf Library .git .gitignore bin/brew
rm  -rf README.md share/man/man1/brew
rm -rf Library/Homebrew Library/Aliases
rm -rf Library/Formula Library/Contributions
rm -rf ~/Library/Caches/Homebrew
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容