论坛首页 综合技术论坛

mac下的包管理器--Homebrew

浏览 1073 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2016-08-25  

linux下有yum,ubuntu下有apt,习惯了使用包管理器安装工具和其依赖,所以mac下可以使用Homebrew。

 

Homebrew官网:http://brew.sh

 

在终端下执行命令即可自动完成安装:

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

 

常用命令:

1.查询:brew search wget  或者使用正则 brew search /wget.*/

2.安装:brew install wget

3.卸载:brew uninstall wget

4.列出使用brew已经安装的全部软件:brew list

5.更新brew:brew update

6.显示依赖包:brew deps wget #显示wget的依赖包,比如openssl

7.显示软件信息:brew info wget

 

github网站有ip访问次数限制,多次调用drew命令后会提示如下错误:

Error: GitHub API Error: API rate limit exceeded for 114.111.167.230. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)
Try again in 44 minutes 38 seconds, or create a personal access token:
  https://github.com/settings/tokens/new?scopes=&description=Homebrew
and then set the token as: export HOMEBREW_GITHUB_API_TOKEN="your_new_token"

 按照提示访问相应的网站,注册个帐号,然后生成一个token,并导入到环境变量中。

 

论坛首页 综合技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics