mac下降级thrift0.9.3

之前直接通过brew install thrift,安装的版本都是0.10.0;由于之前所有服务都是使用0.9.3,所以要降级呀

一、安装bison 2.5版本以上

bison链接:http://www.gnu.org/software/bison/
wget http://ftp.gnu.org/gnu/bison/bison-2.5.tar.gz
tar -zxvf bison-2.5.tar.gz
cd bison-2.5
./configure
make && make install

二、安装thrift
thrift链接:http://archive.apache.org/dist/thrift/
wget http://archive.apache.org/dist/thrift/0.9.3/thrift-0.9.3.tar.gz  
tar -zxvf thrift-0.9.3  
cd thrift-0.9.3
./configure 
make 
make install  

注:安装时,可以带如下参数:

三、验证一下:
thrift -version

参考:https://blog.csdn.net/liaomengge/article/details/55001579

编译报错:

In file included from credential-store.c:1:
In file included from ./cache.h:4:
./git-compat-util.h:270:10: fatal error: 'openssl/ssl.h' file not found

解决方法:

  1. 安装 Xcode-select 命令行工具

  2. 执行xcode-select -p 打印Xcode的工作目录:我的是 /Library/Developer/CommandLineTools

  3. 进入目录cd /Library/Developer/CommandLineTools/usr/include

  4. 找到openssl安装目录下的include目录,该目录下有个openssl文件夹,里面有需要的文件,把整个openssl文件夹copy过来

主要原因是Xcode-select目录下不再有openssl的头文件了,只需要把安装好的openssl的头文件copy过来就可以解决,如果你找不到openssl的安装位置,你也可以通过brew install openssl 安装然后去brew的安装目录寻找

原文地址:https://www.cnblogs.com/jiwawa/p/10039795.html