记录一下在虚拟机CentOS6.8上安装thrift的过程。
安装过程主要参考以下内容:
https://thrift.apache.org/docs/install/centos
需要补充的内容:
1、安装thrift前,可能需要安装libevent2
yum remove 原libevent库
yum install libevent2*
2、可能需要升级g++(以下流程供参考)
wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.bz2
tar -xf gcc-4.8.2.tar.bz2
cd gcc-4.8.2
./contrib/download_prerequisites
mkdir gcc-build-4.8.2
cd gcc-build-4.8.2/
../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib
make
make install
g++ --version
3、安装完成后,可能需要执行以下操作:
1)
cat /etc/ld.so.conf
echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig
2)
cp /usr/local/lib64/libstdc++.so.6.0.18 /usr/lib64/
cd /usr/lib64/
file libstdc++.so.6
rm -f libstdc++.so.6
ln -s libstdc++.so.6.0.18 libstdc++.so.6
file libstdc++.so.6
ldconfig
一个测试用例:
https://my.oschina.net/zmlblog/blog/177245