ubuntu编译安装thrift-0.12.0报错Couldn‘t find libtoolize!

解压

tar zxvf thrift-0.12.0.tar.gz -C /usr/local/src

cd /usr/local/src/thrift-0.12.0

引导时报错,Ubuntu缺少libtool这个工具

# ./bootstrap.sh 
Couldn't find libtoolize!

解决,由于系统是最小化安装默认缺少了很多编译工具,可以都安装上

sudo apt install libtool automake build-essential flex bison libboost-dev libssl-dev -y

编译过程中报下面的错误,缺少Qt相关包

# ./configure --prefix=/usr/local/thrift-0.12
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
......
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking whether ln -s works... yes
checking for gawk... (cached) mawk
checking for ranlib... (cached) ranlib
checking whether g++ supports C++11 features with -std=c++11... yes
./configure: line 18567: syntax error near unexpected token `QT,'
./configure: line 18567: `    PKG_CHECK_MODULES(QT, QtCore >= 4.3, QtNetwork >= 4.3, have_qt=yes, have_qt=no)'

解决

sudo apt install pkgconf

sudo autoreconf -I /usr/share/aclocal

重新编译成功类似这个样子的

thrift 0.12.0

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

Python Library:
   Using Python .............. : /usr/bin/python3
   Using Python version ...... : Python 3.5.2

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 -j4 && make install

做软链

ln -s thrift-0.12/ thrift

版本查看

# ./bin/thrift --version
Thrift version 0.12.0

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值