ubuntu 安装thrift

前端之家收集整理的这篇文章主要介绍了ubuntu 安装thrift前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

一、更新apt-get 源为阿里云的软件源

1、复制原文件备份

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

2、编辑源列表文件

sudo vim /etc/apt/sources.list

3、将原来的列表删除添加如下内容

deb http://mirrors.aliyun.com/ubuntu/ vivid main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-backports main restricted universe multiverse

4、运行sudo apt-get update

5、运行sudo apt-get upgrade

二.安装相关依赖包

1、sudo apt-get install libboost-dev libboost-dbg libboost-doc

2、

sudo apt-get install libboost-test-dev

3、sudo apt-get install libevent-dev automake libtool flex bison g++ libssl-dev


三.下载thrift

wget http://mirrors.hust.edu.cn/apache/thrift/0.10.0/thrift-0.10.0.tar.gz


四.安装thrift

tar -zxvf thrift-0.10.0.tar.gz

cdthrift-0.10.0

./configure

make && make install


thrift 0.10.0


Building Plugin Support ...... : yes
Building C++ Library ......... : yes
Building C (GLib) Library .... : no
Building Java Library ........ : no
Building C# Library .......... : no
Building Python Library ...... : yes
Building Ruby Library ........ : no
Building Haxe Library ........ : no
Building Haskell Library ..... : no
Building Perl Library ........ : no
Building PHP Library ......... : no
Building Dart Library ........ : no
Building Erlang Library ...... : no
Building Go Library .......... : no
Building D Library ........... : no
Building NodeJS Library ...... : no
Building Lua Library ......... : no


C++ Library:
Build TZlibTransport ...... : yes
Build TNonblockingServer .. : yes
Build TQTcpServer (Qt4) .... : no
Build TQTcpServer (Qt5) .... : no


Python Library:
Using Python .............. : /usr/bin/python
Using trial ............... : /usr/bin/trial

五、修改目录

修改/etc/ld.so.conf,然后刷新,好处是比较不受用户的限制

这个没有修改LD_LIBRARY_PATH但是效果是一样的实现动态库的查找,

1. /etc/ld.so.conf下面加一行/usr/local//lib

2. ldconfig

六、查看thrift版本

root@-VirtualBoxthrift -version Thrift version 0.10.0

原文链接:https://www.f2er.com/ubuntu/354089.html

猜你在找的Ubuntu相关文章