受杨秀璋和严娜夫妇的影响 我也开始重拾生活兴趣和热情分享。 虽然才27,8岁,但却工作了8年,大二逃学工作,到如今的慢慢累计。 除了房贷,单身生活似乎没有什么乐趣,全是学习技能,滑雪滑得很好,第一次也是唯一一次就能尽情闪人,避让。及时停车。自由是不想干什么就不干什么
-成功------------
师父给了我安装后的客户端成功仰慕
1. cp /Users/dxm/Desktop/thrift /usr/local/bin/
2. echo $PATH
3. thrift
4. chmod +x /usr/local/bin/thrift
5. thrift
6. thrift -version
-失败------------
Thrift 已经升级至 0.12.0,但是 Gage 使用的版本是 0.11.0,版本之间不兼容Mac 编译安装比较复杂,需要踩的坑比较多, 使用 brew 安装会简化操作,但是 brew 仅提供 最新的 0.12.0 及 0.9.0 两个版本
Mac 使用 brew 安装 Thrift 0.11.0 的安装方式
class Thrift < Formula
desc "Framework for scalable cross-language services development"
homepage "https://thrift.apache.org/"
url "https://www.apache.org/dyn/closer.cgi?path=/thrift/0.11.0/thrift-0.11.0.tar.gz"
sha256 "84321af08a88b55fb203083d5653cf2daf7815dbaa3093deb38af952c65e749b"
bottle do
cellar :any
sha256 "84321af08a88b55fb203083d5653cf2daf7815dbaa3093deb38af952c65e749b" => :mojave
sha256 "51a0d9888ed9ca351ad0668632f0ec920c7509bfb9fa7bca5e0f446fbf3358a2" => :high_sierra
sha256 "3a04020ea21057e390d0abba6e78a1396e78a0b1d415dde61acb456d3833055f" => :sierra
end
head do
url "https://github.com/apache/thrift.git"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "pkg-config" => :build
end
depends_on "bison" => :build
depends_on "boost"
depends_on "openssl"
def install
system "./bootstrap.sh" unless build.stable?
args = %W[
--disable-debug
--disable-tests
--prefix=#{prefix}
--libdir=#{lib}
--with-openssl=#{Formula["openssl"].opt_prefix}
--without-erlang
--without-haskell
--without-java
--without-perl
--without-php
--without-php_extension
--without-python
--without-ruby
]
ENV.cxx11 if ENV.compiler == :clang
# Don't install extensions to /usr:
ENV["PY_PREFIX"] = prefix
ENV["PHP_PREFIX"] = prefix
ENV["JAVA_PREFIX"] = buildpath
system "./configure", *args
ENV.deparallelize
system "make"
system "make", "install"
end
test do
system "#{bin}/thrift", "--version"
end
end
复制以上内容至任意文件,重命名为 thrift.rb
然后使用打开终端, cd 至文件目录 运行命令
brew install ./thrift.rb
…
thrift --version # 查看 thrift 版本
Thrift version 0.11.0 #即为安装成功