源码编译安装boost库,以及卸载boost库

【编译安装boost_1_77_0】
wget https://archives.boost.io/release/1.77.0/source/boost_1_77_0.tar.bz2 --no-check-certificate
tar xf boost_1_77_0.tar.bz2
cd boost_1_77_0
./bootstrap.sh
swapon /root/swapfile
./b2
./b2 install
swapoff /root/swapfile
cd ..

【卸载boost_1_77_0】
[方法1:生成安装文件包,然后使用uninstaller卸载器卸载。
swapon /root/swapfile
./b2 install --prefix=$(pwd)/_install/usr/local
swapoff /root/swapfile
cd _install
tar czf boost-binary.tar.gz usr
/root/uninstaller boost-binary.tar.gz

[方法2]
rm -r /usr/local/include/boost
rm -r /usr/local/lib/libboost*
rm -r /usr/local/lib/cmake/boost*
rm -r /usr/local/lib/cmake/Boost*
rm -r /usr/local/share/boost_predef


提示:编译安装mysql数据库,不用单独下载boost库,更不用编译安装boost库。
只要下载带boost-headers的mysql源码包(如mysql-boost-8.0.42.tar.gz),用-DWITH_BOOST指令指定一下源码包里面的boost文件夹路径就行了。mysql只在编译期间使用boost库,编译完成后,boost库就没用了。
cmake ../mysql-8.0.42 -DWITH_BOOST=../mysql-8.0.42/boost/boost_1_77_0 -DWITH_UNIT_TESTS=OFF -DCURSES_LIBRARY=/usr/lib/libncursesw.so

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

巨大八爪鱼

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值