ubuntu 14.04 安装 Apache Thrift 0.10

1、到官网下载源码压缩文件

https://thrift.apache.org/download

2、安装依赖软件,可以参考

https://thrift.apache.org/docs/install/

我参考的是 Debian/Ubuntu install 这一项

sudo apt-get install automake bison flex g++ git libboost-all-dev libevent-dev libssl-dev libtool make pkg-config

 

但在安装libboost-all-dev 的时候又遇到了许多其他依赖

libboost-all-dev : Depends: libboost-date-time-dev but it is not going to be installed
                    Depends: libboost-filesystem-dev but it is not going to be installed
                    Depends: libboost-iostreams-dev but it is not going to be installed
                    Depends: libboost-log-dev but it is not going to be installed
                    Depends: libboost-python-dev but it is not going to be installed
                    Depends: libboost-regex-dev but it is not going to be installed
                    Depends: libboost-system-dev but it is not going to be installed
                    Depends: libboost-thread-dev but it is not going to be installed
                    Depends: libboost-wave-dev but it is not going to be installed
 
    

可以用下面的方法解决

sudo apt-get install aptitude
sudo aptitude install libboost-all-dev

过程中第一个选N,意思是同意降级使用本机软件,后续选项用Y

 

3、开始安装thrift

tar zxvf thrift-0.10.0.tar.gz
cd thrift-0.10.0
sudo make
sudo make install

 

4、检验是否安装成功

thrift -version

成功会显示

Thrift version 0.10.0

可能会出现错误: (解决错误来自:https://blog.csdn.net/huanbia/article/details/77098205)

thrift: error while loading shared libraries: libthriftc.so.0: cannot open shared object file: No such file or directory

此时首先去查看一下/usr/local/lib下是否有libthriftc.so.0文件

ll /usr/local/lib/libthriftc.so.0 

如果没有请在网上下载并安装。

如果有则需要将该文件所在的路径添加到到/etc/ld.so.conf即可:

(以下命令需要切换到root用户)

echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig

此时切换回普通用户输入thrift -version命令应该可以看到相应的版本了。

posted on 2018-09-26 11:50 potatoknight 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/longjmp/p/9706059.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值