Install Thrift on centos

Source: Internet
Author: User

 

Download thrift Dependencies
Yum-y install automake libtool flex bison pkgconfig gcc-C ++ boost-devel libevent-devel zlib-devel Python-devel ruby-devel crypto-utils
OpenSSL-devel

Download the latest thrift, URL: http://thrift.apache.org
 
Tar-zxvf thrift-0.8.0.tar.gz

Move to the default installation directory
CP-r thrift-0.2.0/usr/local/(default installation directory? Otherwise, the generated thrift binfile may be generated but cannot be found. If it is installed here, the generated thrift will be in/usr/local/bin, at this time, the terminal enters thrift, otherwise the command not found. of course/usr/local/bin should have been set in $ PATH)
 
CD/usr/local/thrift-0.2.0

. /Bootstrap. sh (You have to add the contents '. /aclocal/libtool. m4 'to 'aclocal. m4 '. glibtoolize: You should add the contents '. /aclocal/ltoptions. m4 'to 'aclocal. m4 '. glibtoolize... about libtoolize, no matter, continue with the following command)
 
./Configure -- With-boost =/usr/include/Because boost is installed in/usr/include?
Very important: there may be an error about libtool version mismatch error. this is libtool 2.2.4, but the libtool: definition of this lt_init comes from libtool 2.2.6. libtool: You shoshould recreate aclocal. m4 with macros from libtool 2.2.4 libtool: And run Autoconf again.
 
This is caused by inconsistent libtool versions. If you enter libtool -- version on the terminal, we can see that our version is libtool 2.2.4 (in/usr/bin ). However, the libtool in/usr/local/thrift-0.2.0 is 2.2.6, so the libtool of/usr/bin is copied to/usr/local/thrift-0.2.0 to overwrite the original version. Run the./configure -- With-boost =/usr/include/command above. OK ~~
 

Make
Make install

Input Thrift on the terminal, which has the following stuff: OK, install thrift success.
The thrift binfile is in/usr/local/bin.
Usage: thrift [Options] File
Options:
-Version print the compiler version
-O dir set the output directory for gen-* packages
(Default: Current Directory)
-I dir Add a directory to the list of directories
Searched for include directives
-Nowarn suppress all compiler warnings (BAD !)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.