`
younglibin
  • 浏览: 1207390 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

thfift

 
阅读更多

参考资料:

http://blog.csdn.net/andy_yf/article/details/7396530

 

初始化环境:

写道
sudo apt-get install git-core
sudo apt-get install libevent-dev zlib-devel glib2-devel libssl-dev
sudo apt-get install libboost-dev libboost-test-dev libboost-program-options-dev libtool pkg-config g++
sudo apt-get install ruby1.8-dev libcommons-lang-java php5-dev
sudo apt-get install automake flex bison
sudo apt-get install curl
sudo apt-get install ruby ruby-full ruby-dev librspec-ruby rake rubygems libdaemons-ruby libgemplugin-ruby mongrel
sudo apt-get install python-dev python-twisted
sudo apt-get install libbit-vector-perl
sudo apt-get install php5-dev php5-cli
sudo apt-get install erlang-base erlang-eunit erlang-dev
sudo apt-get install golang
sudo apt-get install libglib2.0-dev
sudo apt-get install ghc6 cabal-install libghc6-binary-dev libghc6-network-dev libghc6-http-dev
sudo apt-get install ant

 

执行:
    sudo ./configure

执行结果:
写道
thrift 0.9.1

Building C++ Library ......... : yes
Building C (GLib) Library .... : yes
Building Java Library ........ : yes
Building C# Library .......... : no
Building Python Library ...... : yes
Building Ruby Library ........ : yes
Building Haskell Library ..... : yes
Building Perl Library ........ : yes
Building PHP Library ......... : yes
Building Erlang Library ...... : yes
Building Go Library .......... : yes
Building D Library ........... : no

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

Java Library:
Using javac ............... : javac
Using java ................ : java
Using ant ................. : /home/libin/software/ant/apache-ant-1.9.0/bin/ant

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

PHP Library:
Using php-config .......... : /usr/bin/php-config

Ruby Library:
Using Ruby ................ : /usr/bin/ruby

Haskell Library:
Using Haskell ............. : /usr/bin/runhaskell
Using Cabal ............... : /usr/bin/cabal

Perl Library:
Using Perl ................ : /usr/bin/perl

Erlang Library:
Using erlc ................ : /usr/bin/erlc

Go Library:
Using Go................... : /usr/bin/go
Using Go version........... : go version go1 

 

 

执行 :

    sudo  make   

   注意这里如果使用 make 出错了,

 

执行:

     sudo make install 

 

 

执行遇到的错误:

错误1: 写道
Configuring thrift-0.9.1...
Setup.lhs: At least the following dependencies are missing:
hashable -any, unordered-containers -any, vector -any
make[3]: *** [all-local] 错误 1
make[3]:正在离开目录 `/home/libin/software/thrift/thrift-0.9.1/lib/hs'
make[2]: *** [all-recursive] 错误 1
make[2]:正在离开目录 `/home/libin/software/thrift/thrift-0.9.1/lib'
make[1]: *** [all-recursive] 错误 1
make[1]:正在离开目录 `/home/libin/software/thrift/thrift-0.9.1'
make: *** [all] 错误 2
安装:
解决方法:
libghc-unordered-containers-dev
 sudo apt-get  install libghc-unordered-containers-dev

 

错误2 写道
make[3]: 正在进入目录 `/home/libin/software/thrift/thrift-0.9.1/lib/erl'
./rebar get-deps
==> jsx (get-deps)
==> erl (get-deps)
./rebar compile
==> jsx (compile)
ERROR: compile failed while processing /home/libin/software/thrift/thrift-0.9.1/lib/erl/deps/jsx: {'EXIT',{{badmatch,{error,eacces}},
[{rebar_otp_app,preprocess,2},
{rebar_otp_app,compile,2},
{rebar_core,run_modules,4},
{rebar_core,execute,4},
{rebar_core,process_dir,4},
{rebar_core,process_each,5},
{rebar_core,process_dir,4},
{rebar_core,process_commands,1}]}}
make[3]: *** [all] 错误 1
解决方法1: 写道
sudo apt-get install erlang-base erlang-eunit erlang-dev
sudo apt-get install erlang erlang-doc

sudo apt-get install npm

npm  install jsx
 
解决方法1:
我们发现 其实他支持很多种语言,我们之需要使用自己需要的比我之需要用 java:
在config的时候,我们不使用其他语言插件即可:
使用一下命令解决:./configure --with-erlang=no --with-perl=no --with-ruby=no --with-haskell=no --with-d=no  --with-php=no --with-php_extension=no   
sudo make clean  
sudo make 

 

看一下结果:
 
出现一下错误:
libin@libin-ThinkPad-T420:~/software/thrift/thrift-0.9.1$ npm install jsx
npm http GET https://registry.npmjs.org/jsx
npm http 304 https://registry.npmjs.org/jsx

npm ERR! Error: No compatible version found: jsx
npm ERR! No valid targets found.
npm ERR! Perhaps not compatible with your version of node?
npm ERR! at installTargetsError (/usr/share/npm/lib/cache.js:488:10)
npm ERR! at next_ (/usr/share/npm/lib/cache.js:438:17)
npm ERR! at next (/usr/share/npm/lib/cache.js:415:44)
npm ERR! at /usr/share/npm/lib/cache.js:408:5
npm ERR! at saved (/usr/share/npm/lib/utils/npm-registry-client/get.js:147:7)
npm ERR! at Object.oncomplete (/usr/lib/nodejs/graceful-fs.js:230:7)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/libin/software/thrift/thrift-0.9.1/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-53-generic
npm ERR! command "node" "/usr/bin/npm" "install" "jsx"
npm ERR! cwd /home/libin/software/thrift/thrift-0.9.1
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message No compatible version found: jsx
npm ERR! message No valid targets found.
npm ERR! message Perhaps not compatible with your version of node?
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/libin/software/thrift/thrift-0.9.1/npm-debug.log
npm not ok
libin@libin-ThinkPad-T420:~/software/thrift/thrift-0.9.1$ npm update
libin@libin-ThinkPad-T420:~/software/thrift/thrift-0.9.1$ npm -version
1.1.4
 请自己安装 下载npm   :http://nodejs.org/download/ 安装 完成 将npm  命令放在 path中
安装   jsx   : npm  install  jsx
 
 
 
 

 

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics