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的安裝目錄尋找


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM