MacOSM1Pro安装thrift0.11.0

Thrift各版本下载地址 https://archive.apache.org/dist/thrift/

一、安装

brew tap-new $USER/local-tap
brew extract --version='0.11.0' thrift $USER/local-tap
brew install [email protected]

==> Fetching zhinian/local-tap/[email protected]

Error: [email protected]: https://www.apache.org/dyn/closer.cgi?path=/thrift/0.11.0/thrift-0.11.0.tar.gz 404

modify thrift.rb

vim /opt/homebrew/Library/Taps/zhinian/homebrew-local-tap/Formula/[email protected]

# 将第四行url的地址改为 https://archive.apache.org/dist/thrift/0.11.0/thrift-0.11.0.tar.gz

# 接着
brew install [email protected]
zhinian@no1~ thrift --version
Thrift Version 0.11.0 

安装完成 !

FAQ

Q1: Mac安装thrift因bison报错的解决办法.
Bison version 2.5 or higher must be installed on the system!
答: mac中默认安装了bison 2.3版本,并配置了路径在path中。使用brew命令安装新版的bison。

# 使用brew命令安装新版的bison。
brew install bison
# 接下来将最新版的安装路径加入到path中
export PATH=/usr/local/Cellar/bison/3.3.2/bin:$PATH
# 查看版本号
bison --version

bison (GNU Bison) 3.8.2
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

在这里插入图片描述