Mac下安装Homebrew

Mac下安装Homebrew

说明:在Mac下配置相关开发环境的时候,可能需要用到Homebrew,也就是说,配置好Homebrew是前置条件。例如:在Mac OS下进行PostgreSQL的配置安装,就需要使用到Homebrew进行安装。(该文档2015年的时候整理好了,一直没发,最近电脑重装系统,配置了相关环境,找了很久的文档,现在贴出来,第一给自己日后做参考,第二,给需要的小伙伴们做做参考)

0、准备工作
Home-brew安装地址
http://brew.sh/index_zh-cn.html

3

1、安装步骤(在终端下操作)
1)$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2)回车键 —> 输入密码(即出现:“Press RETURN to continue or any other key to abort”
以下贴出我终端打印出来的信息

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/. /usr/local/bin
Password:
==> /usr/bin/sudo /usr/sbin/chown wangjiaheng /usr/local/. /usr/local/bin
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/. /usr/local/bin
==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown wangjiaheng /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Counting objects: 4061, done.
remote: Compressing objects: 100% (3911/3911), done.
remote: Total 4061 (delta 35), reused 1858 (delta 19), pack-reused 0
Receiving objects: 100% (4061/4061), 3.33 MiB | 121.00 KiB/s, done.
Resolving deltas: 100% (35/35), done.
From https://github.com/Homebrew/homebrew
 * [new branch]      master     -> origin/master
HEAD is now at 7f8aa6d youtube-dl: update 2016.03.06 bottle.
==> Installation successful!
==> Next steps
Run `brew help` to get started

(说明:如果提示缺少插件,可以使用指令:$ brew install wget 进行更新Homebrew
3)检验是否需要更新wget
3-1)输入:$ find Cellar
3-2)如果提示:find: Cellar: No such file or directory

ShiXionweideMBP:~ shixiongwei$ find Cellar
find: Cellar: No such file or directory
ShiXionweideMBP:~ shixiongwei$ brew install wget
Updating Homebrew...
==> Installing dependencies for wget: openssl
==> Installing wget dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2k.sierra.bottl
######################################################################## 100.0%
==> Pouring openssl-1.0.2k.sierra.bottle.tar.gz
==> Using the sandbox
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
  /usr/local/etc/openssl/certs

and run
  /usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local.

Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries

If you need to have this software first in your PATH run:
  echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile

For compilers to find this software you may need to set:
    LDFLAGS:  -L/usr/local/opt/openssl/lib
    CPPFLAGS: -I/usr/local/opt/openssl/include

==> Summary
��  /usr/local/Cellar/openssl/1.0.2k: 1,696 files, 12M
==> Installing wget 
==> Downloading https://homebrew.bintray.com/bottles/wget-1.19.1.sierra.bottle.t
######################################################################## 100.0%
==> Pouring wget-1.19.1.sierra.bottle.tar.gz
��  /usr/local/Cellar/wget/1.19.1: 10 files, 1.6M

那么就是缺少套件,需要更新wget。
3-3)使用以下指令更新。

$ brew install wget

3-4)跟新完之后,使用$ find Cellar,就可以查找到相对应的信息了。

4

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值