前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >mac homebrew

mac homebrew

作者头像
lin_zone
发布2018-08-15 10:47:26
1.1K0
发布2018-08-15 10:47:26
举报
文章被收录于专栏:LIN_ZONELIN_ZONE

brew 全称Homebrew  是Mac OSX上的软件包管理工具

Homebrew 安装和卸载工具 只用一行命令就能完成

官方地址:    http://brew.sh/index.html

mac 自带ruby    

打开命令行  terminal  

输入  :

  1. ruby -v 

1) 安装命令  

  1. ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"  

假如已经安装了  输入如下命令

  1. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"  

命令行输出:

2) brew 使用方法

命令行 输入:  brew

  1. Example usage:  
  2.   brew [info | home | options ] [FORMULA...]  
  3.   brew install FORMULA...  
  4.   brew uninstall FORMULA...  
  5.   brew search [foo]  
  6.   brew list [FORMULA...]  
  7.   brew update  
  8.   brew upgrade [FORMULA...]  
  9.   brew pin/unpin [FORMULA...]  
  10. Troubleshooting:  
  11.   brew doctor  
  12.   brew install -vd FORMULA  
  13.   brew [--env | config]  
  14. Brewing:  
  15.   brew create [URL [--no-fetch]]  
  16.   brew edit [FORMULA...]  
  17.   open https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md  
  18. Further help:  
  19.   man brew  
  20.   brew home  

3) 安装工具

举个栗子:   wget  这个工具

输入命令:   brew install wget 

如图:

4)  卸载

拿上面的例子:   wget 工具

输入命令    brew uninstall wget

5)  工具安装的目录

Homebrew 会将套件安装到独立目录,并将文件软链接至/usr/local 。

  1. $ cd /usr/local  
  2. $ find Cellar  
  3. Cellar/wget/1.16.1  
  4. Cellar/wget/1.16.1/bin/wget  
  5. Cellar/wget/1.16.1/share/man/man1/wget.1  
  6. $ ls -l bin  
  7. bin/wget -> ../Cellar/wget/1.16.1/bin/wget  

Homebrew 的所有文件均会被安装到预定义目录下,所以无需担心 Homebrew 的安装位置。

6) 其他命令

brew list           列出已安装的软件

brew update     更新brew

brew home       用浏览器打开brew的官方网站

brew info         显示软件信息

brew deps        显示包依赖

更多命令请看:    https://git.io/brew-docs

本文出处:http://blog.csdn.net/aaawqqq/article/details/44088141

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2017-08-16 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1) 安装命令  
  • 2) brew 使用方法
  • 3) 安装工具
  • 4)  卸载
  • 5)  工具安装的目录
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档