Table of Contents
ubuntu thrift 0.9.3编译安装
 运行测试程序
 安装
Home php教程 php手册 ubuntu thrift 0.9.3编译安装

ubuntu thrift 0.9.3编译安装

Jun 13, 2016 am 08:49 AM
apt thrift ubuntu rely Install compile

ubuntu thrift 0.9.3编译安装

 编译并安装

安装依赖

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
Copy after login

生成编译文件

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'
Copy after login

编译前配置,禁用java和python, 安装目录设为/usr/lib,而不是默认的/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.
Copy after login

编译

make
Copy after login

运行测试程序

测试

make check
Copy after login

注意,v0.9.3的make check有个bug, 这里是对应的jira issue, 报错信息是

An error message from getaddrinfo on the console is expected:
Thrift: Mon Dec 14 12:19:09 2015 TServerSocket::listen() BIND 9090
Copy after login

安装

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
    ----------------------------------------------------------------------
    Libraries have been installed in:
       /usr/lib
    
    If you ever happen to want to link against installed libraries
    in a given directory, LIBDIR, you must either use libtool, and
    specify the full pathname of the library, or use the `-LLIBDIR'
    flag during linking and do at least one of the following:
       - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
         during execution
       - add LIBDIR to the `LD_RUN_PATH' environment variable
         during linking
       - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
       - have your system administrator add LIBDIR to `/etc/ld.so.conf'
    
    See any operating system documentation about shared libraries for
    more information, such as the ld(1) and ld.so(8) manual pages.
    ----------------------------------------------------------------------
     /bin/mkdir -p '/usr/local/include/thrift/async'
     /usr/bin/install -c -m 644 src/thrift/async/TAsyncChannel.h src/thrift/async/TAsyncDispatchProcessor.h src/thrift/async/TAsyncProcessor.h src/thrift/async/TAsyncBufferProcessor.h src/thrift/async/TAsyncProtocolProcessor.h src/thrift/async/TConcurrentClientSyncInfo.h src/thrift/async/TEvhttpClientChannel.h src/thrift/async/TEvhttpServer.h '/usr/local/include/thrift/async'
     /bin/mkdir -p '/usr/local/include/thrift/concurrency'
     /usr/bin/install -c -m 644 src/thrift/concurrency/BoostThreadFactory.h src/thrift/concurrency/Exception.h src/thrift/concurrency/Mutex.h src/thrift/concurrency/Monitor.h src/thrift/concurrency/PlatformThreadFactory.h src/thrift/concurrency/PosixThreadFactory.h src/thrift/concurrency/StdMonitor.cpp src/thrift/concurrency/StdMutex.cpp src/thrift/concurrency/StdThreadFactory.cpp src/thrift/concurrency/StdThreadFactory.h src/thrift/concurrency/Thread.h src/thrift/concurrency/ThreadManager.h src/thrift/concurrency/TimerManager.h src/thrift/concurrency/FunctionRunner.h src/thrift/concurrency/Util.h '/usr/local/include/thrift/concurrency'
     /bin/mkdir -p '/usr/local/include/thrift/processor'
     /usr/bin/install -c -m 644 src/thrift/processor/PeekProcessor.h src/thrift/processor/StatsProcessor.h src/thrift/processor/TMultiplexedProcessor.h '/usr/local/include/thrift/processor'
     /bin/mkdir -p '/usr/local/include/thrift/protocol'
     /usr/bin/install -c -m 644 src/thrift/protocol/TBinaryProtocol.h src/thrift/protocol/TBinaryProtocol.tcc src/thrift/protocol/TCompactProtocol.h src/thrift/protocol/TCompactProtocol.tcc src/thrift/protocol/TDebugProtocol.h src/thrift/protocol/TBase64Utils.h src/thrift/protocol/TJSONProtocol.h src/thrift/protocol/TMultiplexedProtocol.h src/thrift/protocol/TProtocolDecorator.h src/thrift/protocol/TProtocolTap.h src/thrift/protocol/TProtocolException.h src/thrift/protocol/TVirtualProtocol.h src/thrift/protocol/TProtocol.h '/usr/local/include/thrift/protocol'
     /bin/mkdir -p '/usr/local/include/thrift/qt'
     /usr/bin/install -c -m 644 src/thrift/qt/TQIODeviceTransport.h src/thrift/qt/TQTcpServer.h '/usr/local/include/thrift/qt'
     /bin/mkdir -p '/usr/local/include/thrift/server'
     /usr/bin/install -c -m 644 src/thrift/server/TConnectedClient.h src/thrift/server/TServer.h src/thrift/server/TServerFramework.h src/thrift/server/TSimpleServer.h src/thrift/server/TThreadPoolServer.h src/thrift/server/TThreadedServer.h src/thrift/server/TNonblockingServer.h '/usr/local/include/thrift/server'
     /bin/mkdir -p '/usr/local/include/thrift'
     /usr/bin/install -c -m 644 ../../config.h src/thrift/thrift-config.h src/thrift/TDispatchProcessor.h src/thrift/Thrift.h src/thrift/TOutput.h src/thrift/TProcessor.h src/thrift/TApplicationException.h src/thrift/TLogging.h src/thrift/cxxfunctional.h src/thrift/TToString.h '/usr/local/include/thrift'
     /bin/mkdir -p '/usr/local/include/thrift/transport'
     /usr/bin/install -c -m 644 src/thrift/transport/PlatformSocket.h src/thrift/transport/TFDTransport.h src/thrift/transport/TFileTransport.h src/thrift/transport/TSimpleFileTransport.h src/thrift/transport/TServerSocket.h src/thrift/transport/TSSLServerSocket.h src/thrift/transport/TServerTransport.h src/thrift/transport/THttpTransport.h src/thrift/transport/THttpClient.h src/thrift/transport/THttpServer.h src/thrift/transport/TSocket.h src/thrift/transport/TPipe.h src/thrift/transport/TPipeServer.h src/thrift/transport/TSSLSocket.h src/thrift/transport/TSocketPool.h src/thrift/transport/TVirtualTransport.h src/thrift/transport/TTransport.h src/thrift/transport/TTransportException.h src/thrift/transport/TTransportUtils.h src/thrift/transport/TBufferTransports.h src/thrift/transport/TShortReadTransport.h src/thrift/transport/TZlibTransport.h '/usr/local/include/thrift/transport'
     /bin/mkdir -p '/usr/lib/pkgconfig'
     /usr/bin/install -c -m 644 thrift.pc thrift-nb.pc thrift-z.pc '/usr/lib/pkgconfig'
    make[4]: Leaving directory '$thrift-git-project/lib/cpp'
    make[3]: Leaving directory '$thrift-git-project/lib/cpp'
    Making install in test
    make[3]: Entering directory '$thrift-git-project/lib/cpp/test'
    make  install-am
    make[4]: Entering directory '$thrift-git-project/lib/cpp/test'
    make[5]: Entering directory '$thrift-git-project/lib/cpp/test'
    make[5]: Nothing to be done for 'install-exec-am'.
    make[5]: Nothing to be done for 'install-data-am'.
    make[5]: Leaving directory '$thrift-git-project/lib/cpp/test'
    make[4]: Leaving directory '$thrift-git-project/lib/cpp/test'
    make[3]: Leaving directory '$thrift-git-project/lib/cpp/test'
    make[2]: Leaving directory '$thrift-git-project/lib/cpp'
    make[2]: Entering directory '$thrift-git-project/lib'
    make[3]: Entering directory '$thrift-git-project/lib'
    make[3]: Nothing to be done for 'install-exec-am'.
    make[3]: Nothing to be done for 'install-data-am'.
    make[3]: Leaving directory '$thrift-git-project/lib'
    make[2]: Leaving directory '$thrift-git-project/lib'
    make[1]: Leaving directory '$thrift-git-project/lib'
    Making install in test
    make[1]: Entering directory '$thrift-git-project/test'
    Making install in cpp
    make[2]: Entering directory '$thrift-git-project/test/cpp'
    make  install-am
    make[3]: Entering directory '$thrift-git-project/test/cpp'
    make[4]: Entering directory '$thrift-git-project/test/cpp'
    make[4]: Nothing to be done for 'install-exec-am'.
    make[4]: Nothing to be done for 'install-data-am'.
    make[4]: Leaving directory '$thrift-git-project/test/cpp'
    make[3]: Leaving directory '$thrift-git-project/test/cpp'
    make[2]: Leaving directory '$thrift-git-project/test/cpp'
    make[2]: Entering directory '$thrift-git-project/test'
    make[3]: Entering directory '$thrift-git-project/test'
    make[3]: Nothing to be done for 'install-exec-am'.
    make[3]: Nothing to be done for 'install-data-am'.
    make[3]: Leaving directory '$thrift-git-project/test'
    make[2]: Leaving directory '$thrift-git-project/test'
    make[1]: Leaving directory '$thrift-git-project/test'
    Making install in tutorial
    make[1]: Entering directory '$thrift-git-project/tutorial'
    Making install in cpp
    make[2]: Entering directory '$thrift-git-project/tutorial/cpp'
    make  install-am
    make[3]: Entering directory '$thrift-git-project/tutorial/cpp'
    make[4]: Entering directory '$thrift-git-project/tutorial/cpp'
    make[4]: Nothing to be done for 'install-exec-am'.
    make[4]: Nothing to be done for 'install-data-am'.
    make[4]: Leaving directory '$thrift-git-project/tutorial/cpp'
    make[3]: Leaving directory '$thrift-git-project/tutorial/cpp'
    make[2]: Leaving directory '$thrift-git-project/tutorial/cpp'
    make[2]: Entering directory '$thrift-git-project/tutorial'
    ../compiler/cpp/thrift --gen html -r ../tutorial/tutorial.thrift
    make[3]: Entering directory '$thrift-git-project/tutorial'
    make[3]: Nothing to be done for 'install-exec-am'.
    make[3]: Nothing to be done for 'install-data-am'.
    make[3]: Leaving directory '$thrift-git-project/tutorial'
    make[2]: Leaving directory '$thrift-git-project/tutorial'
    make[1]: Leaving directory '$thrift-git-project/tutorial'
    make[1]: Entering directory '$thrift-git-project'
    make[2]: Entering directory '$thrift-git-project'
    make[2]: Nothing to be done for 'install-exec-am'.
    make[2]: Nothing to be done for 'install-data-am'.
    make[2]: Leaving directory '$thrift-git-project'
    make[1]: Leaving directory '$thrift-git-project'
    Copy after login
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Solution to the problem that Win11 system cannot install Chinese language pack Solution to the problem that Win11 system cannot install Chinese language pack Mar 09, 2024 am 09:48 AM

Solution to the problem that Win11 system cannot install Chinese language pack With the launch of Windows 11 system, many users began to upgrade their operating system to experience new functions and interfaces. However, some users found that they were unable to install the Chinese language pack after upgrading, which troubled their experience. In this article, we will discuss the reasons why Win11 system cannot install the Chinese language pack and provide some solutions to help users solve this problem. Cause Analysis First, let us analyze the inability of Win11 system to

Unable to install guest additions in VirtualBox Unable to install guest additions in VirtualBox Mar 10, 2024 am 09:34 AM

You may not be able to install guest additions to a virtual machine in OracleVirtualBox. When we click on Devices>InstallGuestAdditionsCDImage, it just throws an error as shown below: VirtualBox - Error: Unable to insert virtual disc C: Programming FilesOracleVirtualBoxVBoxGuestAdditions.iso into ubuntu machine In this post we will understand what happens when you What to do when you can't install guest additions in VirtualBox. Unable to install guest additions in VirtualBox If you can't install it in Virtua

Log in to Ubuntu as superuser Log in to Ubuntu as superuser Mar 20, 2024 am 10:55 AM

In Ubuntu systems, the root user is usually disabled. To activate the root user, you can use the passwd command to set a password and then use the su- command to log in as root. The root user is a user with unrestricted system administrative rights. He has permissions to access and modify files, user management, software installation and removal, and system configuration changes. There are obvious differences between the root user and ordinary users. The root user has the highest authority and broader control rights in the system. The root user can execute important system commands and edit system files, which ordinary users cannot do. In this guide, I'll explore the Ubuntu root user, how to log in as root, and how it differs from a normal user. Notice

What should I do if Baidu Netdisk is downloaded successfully but cannot be installed? What should I do if Baidu Netdisk is downloaded successfully but cannot be installed? Mar 13, 2024 pm 10:22 PM

If you have successfully downloaded the installation file of Baidu Netdisk, but cannot install it normally, it may be that there is an error in the integrity of the software file or there is a problem with the residual files and registry entries. Let this site take care of it for users. Let’s introduce the analysis of the problem that Baidu Netdisk is successfully downloaded but cannot be installed. Analysis of the problem that Baidu Netdisk downloaded successfully but could not be installed 1. Check the integrity of the installation file: Make sure that the downloaded installation file is complete and not damaged. You can download it again, or try to download the installation file from another trusted source. 2. Turn off anti-virus software and firewall: Some anti-virus software or firewall programs may prevent the installation program from running properly. Try disabling or exiting the anti-virus software and firewall, then re-run the installation

How to install Android apps on Linux? How to install Android apps on Linux? Mar 19, 2024 am 11:15 AM

Installing Android applications on Linux has always been a concern for many users. Especially for Linux users who like to use Android applications, it is very important to master how to install Android applications on Linux systems. Although running Android applications directly on Linux is not as simple as on the Android platform, by using emulators or third-party tools, we can still happily enjoy Android applications on Linux. The following will introduce how to install Android applications on Linux systems.

Android TV Box gets unofficial Ubuntu 24.04 upgrade Android TV Box gets unofficial Ubuntu 24.04 upgrade Sep 05, 2024 am 06:33 AM

For many users, hacking an Android TV box sounds daunting. However, developer Murray R. Van Luyn faced the challenge of looking for suitable alternatives to the Raspberry Pi during the Broadcom chip shortage. His collaborative efforts with the Armbia

How to install Angular on Ubuntu 24.04 How to install Angular on Ubuntu 24.04 Mar 23, 2024 pm 12:20 PM

Angular.js is a freely accessible JavaScript platform for creating dynamic applications. It allows you to express various aspects of your application quickly and clearly by extending the syntax of HTML as a template language. Angular.js provides a range of tools to help you write, update and test your code. Additionally, it provides many features such as routing and form management. This guide will discuss how to install Angular on Ubuntu24. First, you need to install Node.js. Node.js is a JavaScript running environment based on the ChromeV8 engine that allows you to run JavaScript code on the server side. To be in Ub

How to install Podman on Ubuntu 24.04 How to install Podman on Ubuntu 24.04 Mar 22, 2024 am 11:26 AM

If you have used Docker, you must understand daemons, containers, and their functions. A daemon is a service that runs in the background when a container is already in use in any system. Podman is a free management tool for managing and creating containers without relying on any daemon such as Docker. Therefore, it has advantages in managing containers without the need for long-term backend services. Additionally, Podman does not require root-level permissions to be used. This guide discusses in detail how to install Podman on Ubuntu24. To update the system, we first need to update the system and open the Terminal shell of Ubuntu24. During both installation and upgrade processes, we need to use the command line. a simple

See all articles