scribe git地址
https://github.com/facebookarchive/scribe
文档写的很清楚 需要的库
准备的文件
安装依赖
yum -y install gcc gcc-c++ m4 autoconf automake libtool libicu-devel python-devel libevent-devel
刷新动态链接库
/sbin/ldconfig
安装boost
解压,再进入带目录
./bootstrap.sh --prefix=/usr/local/boost
./b2 --prefix=/usr/local/boost install 或者./bjam --prefix=/usr/local/boost install
ps:./b2是./bjam 升级版本
echo "/usr/local/boost/lib/" >> /etc/ld.so.conf
/sbin/ldconfig
安装thrift8版本
./configure --prefix=/usr/local/thrift --with-csharp=no --with-java=no --with-erlang=no --with-perl=no --with-php=no --with-ruby=no --with-py=yes --with-libevent --with-boost=/usr/local/boost/
make
make install
echo "/usr/local/thrift/lib/" >> /etc/ld.so.conf
/sbin/ldconfig
安装fbf303
./bootstrap.sh --with-boost=/usr/local/boost/
./configure --prefix=/usr/local/fb303 --with-boost=/usr/local/boost/ --with-thriftpath=/usr/local/thrift/
make
make install
安装我们的主角 scribe
./bootstrap.sh --prefix=/usr/local/scribe --with-thriftpath=/usr/local/thrift/ --with-fb303path=/usr/local/fb303/ --with-boost=/usr/local/boost/
./configure --prefix=/usr/local/scribe --with-thriftpath=/usr/local/thrift/ --with-fb303path=/usr/local/fb303/ --with-boost=/usr/local/boost/ CPPFLAGS="-DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H"
make
make install
安装OK
如果出现error: expected constructor, destructor, or type conversion before ‘readAll’
要在./configure 后面加入CPPFLAGS="-DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H"