其他分享
首页 > 其他分享> > 安装旧版本thrift

安装旧版本thrift

作者:互联网

安装旧版本的thrift

卸载旧版本,下载安装包

wget http://archive.apache.org/dist/thrift/0.9.3/thrift-0.9.3.tar.gz
tar -zxvf thrift-0.9.3.tar.gz
brew uninstall thrift  

bison处理

安装替代可用bison要求版本在2.5以上

查看一下当前的bison版本
bison --version
如果低于2.5,就要另外准备一个
brew install bison

brew安装完bison后会给出一个提示:
在这里插入图片描述
这个说明很重要,因为现在还是用的默认的bison。需要执行给出的提示语句才能替换默认bison

可以通过
where bison
查看当前使用的bison路径。然后执行环境配置(建议先备份一下以前的)
cp ~/.zshrc ~/Desktop/benfen   
echo 'export PATH="/usr/local/opt/bison/bin:$PATH"' >> ~/.zshrc
再次执行
➜  ~ where bison
/usr/local/opt/bison/bin/bison
/usr/bin/bison
➜  ~ bison --version
bison (GNU Bison) 3.7.6
Written by Robert Corbett and Richard Stallman.

可以看到bison已经准备好了

编译安装

不要直接./configure,可能会报错的(导致后续执行make的时候报依赖问题),建议执行:

./configure --prefix=/usr/local/ --with-boost=/usr/local --with-libevent=/usr/local --without-ruby --without-perl --without-php --without-nodejs
然后执行
make
make install

其他方式

没有亲测,但看上去很方便:
https://www.coder4.com/archives/6864

brew install https://gist.githubusercontent.com/chrislusf/8b4e7c19551ba220232f037b43c0eaf3/raw/01465b867b8ef9af7c7c3fa830c83666c825122d/thrift.rb

标签:--,local,bison,usr,旧版本,安装,thrift
来源: https://blog.csdn.net/qq_25929565/article/details/115705691