要是你还是不懂RPC的运行原理,来看我的这篇文章:https://blog.csdn.net/singgel/article/details/70256740
git上存放的有thrift的一个springboot版本的demo:https://github.com/singgel/thriftDemo
安装的时候我的内心也是很崩溃,啥玩意儿,不是缺这就是缺那的
OS X Setup
The following command install all the required tools and libraries to build and install the Apache Thrift compiler on a OS X based system.
Install Boost
Download the boost library from boost.org untar compile with
./bootstrap.shsudo ./b2 threading=multi address-model=64 variant=release stage install
bufferevent_openssl.c:60:10: fatal error: 'openssl/bio.h' file not found solve error blow: 看看bio.h文件在哪个位置,然后引入。 sh-3.2# find / -name -type f bio.h /usr/local/Cellar/openssl/1.0.1l/include/openssl/bio.h 打到bio.h文件之后,我们再让文件编辑时找到它,建立一个软链接 //如果没有/usr/local/include文件夹,则建一个include文件夹 sudo ln -s /usr/local/Cellar/openssl/1.0.1l/include/openssl/ /usr/local/include/openssl |
Install libevent
Download libevent, untar and compile with
./configure --prefix=/usr/local makesudo make install
Building Apache Thrift
Download the latest version of Apache Thrift, untar and compile with
./configure --prefix=/usr/local/ --with-boost=/usr/local --with-libevent=/usr/local
make
sudo make install
configure: error: Bison version 2.5 or higher must be installed on the system! See here. You can install with brew: brew install bison and then use: brew link bison --force Don't forget to unlink it if necessary (brew unlink bison). |