步骤php
1.下载thrift0.9.3的安装包,进行解压。
2. 执行configurenode
./configure --prefix=/usr/local/ --with-boost=/usr/local --with-libevent=/usr/local --without-ruby --without-perl --without-php --without-nodejs
3.执行make,出现异常按3.3处理。
4. 执行make install
5. 安装完成后输入thrift --version,正常显示版本号ruby
Thrift version 0.9.3
PS:
3.3 make时,报”configure: error: Bison version 2.5 or higher must be installed on the system!”,缘由为osc上的预装的bison版本冲突,须要从新安装bison。步骤以下
3.3.1 从http://www.gnu.org/software/bison/ 上下载最新的bison.tar.gz,并解压。
3.3.2 进入解压目录,进行configure, 用prefix指定目录测试
./configure --prefix=/Library/Developer/CommandLineTools/usr/bin/bison
3.3.3 执行make
3.3.4 执行install,安装完成code
3.3.5 将/usr/bin中的bison删除,将新安装的指定目录下的bison 复制到/usr/bin中it
sudo cp /Library/Developer/CommandLineTools/usr/bin/bison bison
3.3.6 测试输入bison --versionio
bison (GNU Bison) 3.0