通过homebrew可以管理众多开源软件的安装和卸载。使用homebrew可以非常容易的安装 os x中没有包含的unix工具包和语言包,比如wget;node;lua;rabbitmq;nginx等
 
安装
1.在终端运行命令
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
第一次安装提示信息:
localhost:~ bobo$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
/usr/local/Homebrew
==> The following new directories will be created:
/usr/local/Cellar
/usr/local/Homebrew
/usr/local/Frameworks
/usr/local/bin
/usr/local/etc
/usr/local/include
/usr/local/lib
/usr/local/opt
/usr/local/sbin
/usr/local/share
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var
 
Press RETURN to continue or any other key to abort
 
当执行到fatal: unable to access 'https://github.com/Homebrew/brew/': Failed to connect to github.com port 443: Operation timed out
 
2.好吧,既然没有安装成功(可能有临时文件)那就卸载干净重新安装呗
执行卸载命令:
localhost:~ bobo$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
奶奶的,说什么没有找到改软件
Failed to locate Homebrew!
 
3.你既然说没有找到该软件(就是没有安装呗),那就再次执行安装命令呗
localhost:~ bobo$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
火大了!!! 又提示我已经安装过啦 哼哼哼~
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
The current contents of /usr/local are bin Cellar etc Frameworks Homebrew include lib opt sbin share var
 
4.没办法啊,去卸载干净再来吧。丧~
网上各种命令卸载都不好使,既然有安装的临时文件,那就各种删除临时文件。
依第一次安装新建的文件夹住要删除Cellar ; Frameworks ; Homebrew此三个文件
---> local ls -al
rm -rf Cellar Frameworks Homebrew
注:文件夹可能删除不了报“权限拒绝访问” , 查看笔记命令(常用)
5.再次安装
localhost:~ bobo$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
-e:82: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following new directories will be created:
/usr/local/Cellar
/usr/local/Homebrew
/usr/local/Frameworks
 
Press RETURN to continue or any other key to abort
 
这次安装只新建了3个文件夹,就是之前删除的那三个。
继续往下执行,最后出现下面的提示表示安装成功
==> Installation successful!
==> Next steps
Run `brew help` to get started
Further documentation: https://git.io/brew-docs
==> Homebrew has enabled anonymous aggregate user behaviour analytics
Read the analytics documentation (and how to opt-out) here:
 
执行brew help , 正常显示命令帮助,nice。
 
 

mac之homebrew安装的更多相关文章

  1. mac下 home-brew安装及php,nginx环境安装及配置

    Homebrew官网 http://brew.sh/index_zh-cn.html Homebrew是神马 linux系统有个让人蛋疼的通病,软件包依赖,好在当前主流的两大发行版本都自带了解决方案, ...

  2. mac上Homebrew安装以及python安装

    Homebrew homebrew是一款Mac OS平台下的软件包管理工具,拥有安装.卸载.更新.查看.搜索等很多实用的功能. Homebrew常用命令 查看brew的帮助:brew –help 安装 ...

  3. mac系统homebrew安装mysql

    homebrew 安装 mysql homebrew 是 macOS 缺失的软件包管理器,譬如可以下载 mysql.redis.wget 等等.操作系统:macOS High Sierra Versi ...

  4. # mac使用homebrew安装jdk和tomcat

    homebrew安装jdk 前提是已经安装homebrew //直接命令行安装 brew cask install homebrew/cask-versions/adoptopenjdk8 homeb ...

  5. Mac通过homebrew 安装mysql

    来源:http://timtang.me/blog/2011/12/07/mac-homebrew-mysql/ 使用MBP有一年了,开始想在工作中使用mac由于各种不习惯最终失败,导致自己使用了一年 ...

  6. Mac下Homebrew安装的软件放在什么地方

    一般情况是这么操作的: 1.通过brew install安装应用最先是放在/usr/local/Cellar/目录下. 2.有些应用会自动创建软链接放在/usr/bin或者/usr/sbin,同时也会 ...

  7. MAC使用homeBrew安装Redis

    homeBrew的操作命令如下: brew search ** //查找某个软件包 brew list //列出已经安装的软件的包 brew install ** //安装某个软件包,默认安装的是稳定 ...

  8. mac 使用homebrew 安装mysql

    1. 安装homebrew ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" brew update ...

  9. Mac下 homebrew 安装mysql

    操作步骤 安装homebrew brew install mysql 安装mysql 安装完成之后,可以运行命令启动mysql服务 mysql.server start 然后输入命令设置密码 mysq ...

随机推荐

  1. 2、Flask实战第2天:URL传参

    当我们访问网站/的时候,会执行hell_world函数,并把这个函数的返回值返回给浏览器,这样浏览器就显示hello world了 @app.route('/') def hello_world(): ...

  2. NOIP 2015 跳石头

    题目背景 一年一度的“跳石头”比赛又要开始了! 题目描述 这项比赛将在一条笔直的河道中进行,河道中分布着一些巨大岩石.组委会已经选择好了两块岩石作为比赛起点和终点.在起点和终点之间,有 N 块岩石(不 ...

  3. TZOJ 5396: 集五福过大年

    描述 又是一年春来到,伴随着春节,支付宝的“集五福”活动又开始了,五福分别是“爱国福”.“富强福”.“和谐福”.“友善福”和“敬业福”,五张不同的福卡可以合成一张“五福到”,crq也扫了不少福,这么多 ...

  4. WebService综述

    一.序言 大家或多或少都听过WebService(Web服务),有一段时间很多计算机期刊.书籍和网站都大肆的提及和宣传WebService技术,其中不乏很多吹嘘和做广告的成分.但是不得不承认的是Web ...

  5. Problem B: 调用函数,输出100到200之间的所有素数

    #include <stdio.h> int isPrime(unsigned int n)//定义素数函数 { int i; || n == ) ; ; i * i <= n; i ...

  6. 关于char类型的说明

    #include<iostream> using namespace std; int main() {  char ch=128;//VC编译器默认是有符号的.但c并未明确给出.由编译器 ...

  7. Scala实战高手****第13课:Scala模式匹配实战和Spark源码鉴赏

    package com.dt.spark.scala.bascis class Dataframework case class Computerframework (name:String,popu ...

  8. yum出现的“UnicodeDecodeError: 'ascii' codec”问题解决

    新装了CentOS 6.5系统,打算使用yum安装程序是出现了如下错误: Loading mirror speeds from cached hostfile Traceback (most rece ...

  9. Android中的动态字符串的处理

    1.效果显示 2. MainAcitivity.java package com.example.app2; import android.support.v7.app.AppCompatActivi ...

  10. Spring中@Value用法收集

    一.配置方式 @Value需要参数,这里参数可以是两种形式: @Value("#{configProperties['t1.msgname']}") 或者 @Value(" ...