MAC 使用 brew 安装 git

通过brew安装git,命令如下:

brew install git


安装过程:

==> Downloading https://homebrew.bintray.com/bottles/git-2.5.0.yosemite.bottle.t
######################################################################## 100.0%
==> Pouring git-2.5.0.yosemite.bottle.tar.gz
==> Caveats
The OS X keychain credential helper has been installed to:
  /usr/local/bin/git-credential-osxkeychain

The "contrib" directory has been installed to:
  /usr/local/share/git-core/contrib

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completion has been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
  /usr/local/Cellar/git/2.5.0: 1383 files, 32M


检测git是否安装成功:

git --version   显示当前git的版本,我的2.5.0

which git显示当前git的路径,一般在/usr/local/Cellar/git


安装成功:


brew install gcc

==> Installing dependencies for gcc: gmp, mpfr, libmpc, isl

==> Installing gcc dependency: gmp

==> Downloading https://homebrew.bintray.com/bottles/gmp-6.0.0a.yosemite.bottle.

######################################################################## 100.0%

==> Pouring gmp-6.0.0a.yosemite.bottle.tar.gz

��  /usr/local/Cellar/gmp/6.0.0a: 15 files, 3.2M

==> Installing gcc dependency: mpfr

==> Downloading https://homebrew.bintray.com/bottles/mpfr-3.1.3.yosemite.bottle.

######################################################################## 100.0%

==> Pouring mpfr-3.1.3.yosemite.bottle.tar.gz

��  /usr/local/Cellar/mpfr/3.1.3: 24 files, 3.6M

==> Installing gcc dependency: libmpc

==> Downloading https://homebrew.bintray.com/bottles/libmpc-1.0.3.yosemite.bottl

######################################################################## 100.0%

==> Pouring libmpc-1.0.3.yosemite.bottle.tar.gz

��  /usr/local/Cellar/libmpc/1.0.3: 10 files, 380K

==> Installing gcc dependency: isl

==> Downloading https://homebrew.bintray.com/bottles/isl-0.14.1.yosemite.bottle.

######################################################################## 100.0%

==> Pouring isl-0.14.1.yosemite.bottle.3.tar.gz

��  /usr/local/Cellar/isl/0.14.1: 68 files, 3.2M

==> Installing gcc

==> Downloading https://homebrew.bintray.com/bottles/gcc-5.2.0.yosemite.bottle.t

#####################################                                     52.0%

curl: (56) SSLRead() return error -9806

Error: Failed to download resource "gcc"

Download failed: https://homebrew.bintray.com/bottles/gcc-5.2.0.yosemite.bottle.tar.gz

Warning: Bottle installation failed: building from source.

==> Downloading http://ftpmirror.gnu.org/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2

==> Downloading from http://mirror.hust.edu.cn/gnu/gcc/gcc-5.2.0/gcc-5.2.0.tar.b

######################                                                    30.8%

curl: (56) Recv failure: Operation timed out

Trying a mirror...

==> Downloading https://ftp.gnu.org/gnu/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2

###################################                                       49.9%

curl: (56) SSLRead() return error -36

Error: Failed to download resource "gcc"

Download failed: https://ftp.gnu.org/gnu/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2

liuyy-iMac:2.5.0 liuyy$ brew install gcc

==> Downloading https://homebrew.bintray.com/bottles/gcc-5.2.0.yosemite.bottle.t

######################################                                    54.1%

curl: (56) SSLRead() return error -9806

Error: Failed to download resource "gcc"

Download failed: https://homebrew.bintray.com/bottles/gcc-5.2.0.yosemite.bottle.tar.gz

Warning: Bottle installation failed: building from source.

==> Downloading http://ftpmirror.gnu.org/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2

==> Downloading from http://mirror.hust.edu.cn/gnu/gcc/gcc-5.2.0/gcc-5.2.0.tar.b

####################################                                      50.0%

curl: (56) Recv failure: Operation timed out

Trying a mirror...

==> Downloading https://ftp.gnu.org/gnu/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2

####################################                                      50.4%

curl: (56) SSLRead() return error -36

Error: Failed to download resource "gcc"

Download failed: https://ftp.gnu.org/gnu/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2

liuyy-iMac:2.5.0 liuyy$ brew install gcc

==> Downloading https://homebrew.bintray.com/bottles/gcc-5.2.0.yosemite.bottle.t

#########################################                                 57.2%

curl: (56) SSLRead() return error -9806

Error: Failed to download resource "gcc"

Download failed: https://homebrew.bintray.com/bottles/gcc-5.2.0.yosemite.bottle.tar.gz

Warning: Bottle installation failed: building from source.

==> Downloading http://ftpmirror.gnu.org/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2

==> Downloading from http://mirror.hust.edu.cn/gnu/gcc/gcc-5.2.0/gcc-5.2.0.tar.b

#####################################                                     51.5%

curl: (56) Recv failure: Operation timed out

Trying a mirror...

==> Downloading https://ftp.gnu.org/gnu/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2

#####################################                                     51.6%

curl: (56) SSLRead() return error -36

Error: Failed to download resource "gcc"

Download failed: https://ftp.gnu.org/gnu/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2

liuyy-iMac:2.5.0 liuyy$ brew install gcc

==> Downloading https://homebrew.bintray.com/bottles/gcc-5.2.0.yosemite.bottle.t

######################################################################## 100.0%

==> Pouring gcc-5.2.0.yosemite.bottle.tar.gz

==> Caveats

GCC has been built with multilib support. Notably, OpenMP may not work:

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

If you need OpenMP support you may want to

  brew reinstall gcc --without-multilib

==> Summary

��  /usr/local/Cellar/gcc/5.2.0: 1353 files, 248M


  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值