华南俳烁实业有限公司

考試首頁 | 考試用書 | 培訓(xùn)課程 | 模擬考場 | 考試論壇  
  當(dāng)前位置:操作系統(tǒng) > Linux > 文章內(nèi)容
  

Linux基礎(chǔ)教程:Ubuntu下thrift0.9.3編譯安裝

 [ 2016年2月29日 ] 【

Ubuntu下thrift 0.9.3編譯安裝

1 下載thrift源代碼
git clone https://git-wip-us.apache.org/repos/asf/thrift.git thrift
git checkout 0.9.3
2 編譯并安裝
安裝依賴

apt-get install automake
apt-get install libssl-dev
apt-get install byacc
apt-get install bison
apt-get install flex
apt-get install libevent-dev
生成編譯文件

cd thrift
./bootstrap.sh
configure.ac:84: installing './compile'
configure.ac:88: installing './config.guess'
configure.ac:88: installing './config.sub'
configure.ac:27: installing './install-sh'
configure.ac:27: installing './missing'
compiler/cpp/Makefile.am: installing './depcomp'
configure.ac: installing './ylwrap'
編譯前配置,禁用java和python, 安裝目錄設(shè)為/usr/lib,而不是默認(rèn)的/usr/local/lib

./configure --libdir=/usr/lib --without-java --without-python
...
thrift 0.9.3

Building C++ Library ......... : yes
Building C (GLib) Library .... : no
Building Java Library ........ : no
Building C# Library .......... : no
Building Python Library ...... : no
Building Ruby Library ........ : no
Building Haxe Library ........ : no
Building Haskell Library ..... : no
Building Perl Library ........ : no
Building PHP 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

If something is missing that you think should be present,
please skim the output of configure to find the missing
component.  Details are present in config.log.
編譯

make
3 運(yùn)行測試程序
測試

make check
注意,v0.9.3的make check有個bug, 這里是對應(yīng)的jira issue, 報錯信息是

An error message from getaddrinfo on the console is expected:
Thrift: Mon Dec 14 12:19:09 2015 TServerSocket::listen() BIND 9090
4 安裝
sudo make install

注意:

$thrift-git-project 是thrift gi項目所在目錄
庫文件安裝在/usr/lib目錄下
頭文件安裝在/usr/local/include/thrift目錄下
Making install in compiler/cpp
make[1]: Entering directory '$thrift-git-project/compiler/cpp'
make  install-am
make[2]: Entering directory '$thrift-git-project/compiler/cpp'
make[3]: Entering directory '$thrift-git-project/compiler/cpp'
 /bin/mkdir -p '/usr/local/bin'
  /bin/bash ../../libtool  --mode=install /usr/bin/install -c thrift '/usr/local/bin'
libtool: install: /usr/bin/install -c thrift /usr/local/bin/thrift
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '$thrift-git-project/compiler/cpp'
make[2]: Leaving directory '$thrift-git-project/compiler/cpp'
make[1]: Leaving directory '$thrift-git-project/compiler/cpp'
Making install in lib
make[1]: Entering directory '$thrift-git-project/lib'
Making install in cpp
make[2]: Entering directory '$thrift-git-project/lib/cpp'
Making install in .
make[3]: Entering directory '$thrift-git-project/lib/cpp'
make[4]: Entering directory '$thrift-git-project/lib/cpp'
 /bin/mkdir -p '/usr/lib'
 /bin/bash ../../libtool  --mode=install /usr/bin/install -c  libthrift.la libthriftnb.la libthriftz.la '/usr/lib'
libtool: install: /usr/bin/install -c .libs/libthrift-0.9.3.so /usr/lib/libthrift-0.9.3.so
libtool: install: (cd /usr/lib && { ln -s -f libthrift-0.9.3.so libthrift.so || { rm -f libthrift.so && ln -s libthrift-0.9.3.so libthrift.so; }; })
libtool: install: /usr/bin/install -c .libs/libthrift.lai /usr/lib/libthrift.la
libtool: install: /usr/bin/install -c .libs/libthriftnb-0.9.3.so /usr/lib/libthriftnb-0.9.3.so
libtool: install: (cd /usr/lib && { ln -s -f libthriftnb-0.9.3.so libthriftnb.so || { rm -f libthriftnb.so && ln -s libthriftnb-0.9.3.so libthriftnb.so; }; })
libtool: install: /usr/bin/install -c .libs/libthriftnb.lai /usr/lib/libthriftnb.la
libtool: install: /usr/bin/install -c .libs/libthriftz-0.9.3.so /usr/lib/libthriftz-0.9.3.so
libtool: install: (cd /usr/lib && { ln -s -f libthriftz-0.9.3.so libthriftz.so || { rm -f libthriftz.so && ln -s libthriftz-0.9.3.so libthriftz.so; }; })
libtool: install: /usr/bin/install -c .libs/libthriftz.lai /usr/lib/libthriftz.la
libtool: install: /usr/bin/install -c .libs/libthrift.a /usr/lib/libthrift.a
libtool: install: chmod 644 /usr/lib/libthrift.a
libtool: install: ranlib /usr/lib/libthrift.a
libtool: install: /usr/bin/install -c .libs/libthriftnb.a /usr/lib/libthriftnb.a
libtool: install: chmod 644 /usr/lib/libthriftnb.a
libtool: install: ranlib /usr/lib/libthriftnb.a
libtool: install: /usr/bin/install -c .libs/libthriftz.a /usr/lib/libthriftz.a
libtool: install: chmod 644 /usr/lib/libthriftz.a
libtool: install: ranlib /usr/lib/libthriftz.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/lib
----------------------------------------------------------------------

首頁 1 2 尾頁
本文糾錯】【告訴好友】【打印此文】【返回頂部
將考試網(wǎng)添加到收藏夾 | 每次上網(wǎng)自動訪問考試網(wǎng) | 復(fù)制本頁地址,傳給QQ/MSN上的好友 | 申請鏈接 | 意見留言 TOP
關(guān)于本站  網(wǎng)站聲明  廣告服務(wù)  聯(lián)系方式  站內(nèi)導(dǎo)航  考試論壇
Copyright © 2007-2013 中華考試網(wǎng)(Examw.com) All Rights Reserved
敦煌市| 高雄县| 邵阳市| 文山县| 天柱县| 和政县| 白朗县| 余干县| 诏安县| 阿瓦提县| 子洲县| 余姚市| 华宁县| 齐齐哈尔市| 泽普县| 铁岭市| 宝丰县| 西吉县| 北辰区| 新乐市| 瑞昌市| 蒙阴县| 徐州市| 肃宁县| 长治县| 镶黄旗| 无为县| 长丰县| 景谷| 崇州市| 通城县| 新民市| 江达县| 汝南县| 尉犁县| 上饶市| 澄江县| 疏勒县| 伽师县| 宣武区| 库伦旗|