mac os 安装thrift

原文转自http://www.cnblogs.com/peterpanzsy/p/4210127.html


在安装libevent出现

Install libevent bufferevent_openssl.c:60:10: fatal error: 'openssl/bio.h' file not found

brew install openssl

brew link openssl --force

cp -R /usr/local/Cellar/openssl/1.0.2h_1/include/openssl ~/software/libevent-2.0.22-stable


安装thrift出现bison版本过低,由于mac默认安装了bison,在/usr/bin目录下,网上说的该版本我会出现权限不够,所以另寻他法:

参考:http://blog.csdn.net/qq910894904/article/details/41132779

升级 bison

wget http://ftp.gnu.org/gnu/bison/bison-2.5.1.tar.gz
tar xvf bison-2.5.1.tar.gz
cd bison-2.5.1
./configure --prefix=/usr
make
sudo make install
cd ..

安装thrift 

安装thrift-0.10.0的时候老是报dyld:sybom not found:_GENERAL_NAME_FREE

没有找到解决办法,就换成thrift-0.9.3

make 出现 'openssl/xx.h' file not found,依旧是cp -R  /usr/local/openssl/include/openssl ~/thrift

出现Nothing to be done for `all' 解决方法

1.这句提示是说明你已经编译好了,而且没有对代码进行任何改动。

若想重新编译,可以先删除以前编译产生的目标文件:
make clean
然后再
make

make[4]: Entering directory `/home/yantze/dl/thrift/lib/cpp/test'

在make install时报错):

mkdir: /usr/lib/xx/Thrift: Operation not permitted


先这样configure

./configure --prefix=/usr/local/ --with-xx=no --with-boost=/usr/local CXXFLAGS="-g -O2"


然后再sudo make,sudo make install


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值