首先apt-get install必须的依赖
apt-get install libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev
在thrift.apache.org上下载0.7.0版本的thrift
./configure --with-ruby=no
make
make install
然后cd contrib/fb303
./bootstrap.sh
make
make install
安装fb303是必须的,否则scribe无法编译
scribe是从git上获取的
安装步骤同fb303
编译好scribe之后,运行src/scribed examples/example1.conf,能正常运行即为编译成功
如果遇到src/scribed: error while loading shared libraries: libthrift.so.0: cannot open shared object file: No such file or directorycuw错误,将/usr/local/lib/libthrift.so.0 append到/etc/ld.so.conf并执行ldconfig即可
之前安装失败, google半天收到不少误导...结果发现把thrift && fb303 && scribe的文件中apache::thrift和namespace apache都替换成facebook::thrift和namespace facebook也能编译...仔细看了下才知道要先安装fb303


Leave a comment