mac 下如何安装上thrift

步骤:php

一、确保本身又brew 能够下载软件,若是没有则在命令中输入git

curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local --strip 1

二、进入超级用户github

sudo su

三、下载安装thrift,安装时间比较长api

brew install thrift

 

安装过程bash

sh-3.2# brew install thrift
==> Installing dependencies for thrift: boost
==> Installing thrift dependency: boost
==> Downloading https://homebrew.bintray.com/bottles/boost-1.60.0_2.el_capitan.b
######################################################################## 100.0%
==> Pouring boost-1.60.0_2.el_capitan.bottle.1.tar.gz
🍺  /usr/local/Cellar/boost/1.60.0_2: 11,139 files, 434.0M
==> Installing thrift
==> Downloading https://homebrew.bintray.com/bottles/thrift-0.9.3.el_capitan.bot
######################################################################## 100.0%
==> Pouring thrift-0.9.3.el_capitan.bottle.tar.gz
==> Caveats
To install Ruby binding:
  gem install thrift

To install PHP extension for e.g. PHP 5.5:
  brew install homebrew/php/php55-thrift
==> Summary
🍺  /usr/local/Cellar/thrift/0.9.3: 94 files, 5.3M
sh-3.2#

四、安装完后,确认thrift是否安装完成curl

sh-3.2# thrift -version
Thrift version 0.9.3
sh-3.2#

 

 

总结:url

从官网直接下载thrift.tar.gz本地安装,会出错。若是出错,最好的解决方式就是brew在线下载安装。本人将网上的大部分的操做都试过,可是换汤不换药。根据在线安装的步骤,须要先下载安装boost,而后再下载thrift安装。code

相关文章
相关标签/搜索