rm -rf /usr/lib64/boost
rm -rf /usr/include/boost/
非编译安装 yum install boost-devel
查看boost库版本:
cat /usr/include/boost/version.hpp
安装别的库时,若有提示 MySQL currently requires boost_1_59_0
则
cmake -DWITH_BOOST=/home/boost/boost_1_59_0 .
./b2 提示 fatal error: bzlib.h: No such file or directory
yum install bzip2-devel (apt对应的库自己百度看)
编译xtrabackup
失败情况下需要
rm -rf CMakeCache.txt 再尝试
-bash: /usr/bin/cmake: No such file or directory错误
解决方法:
先将旧的安装移除
在cmake源码目录
make uninstall
开始新的安装指定目录到/usr
./bootstrap --prefix=/usr/
gmake
make install
问题提示:
-- Running cmake version 3.5.1
-- Found Git: /usr/bin/git (found version "1.8.3.1")
-- This is el6, el7 or el8 as found from 'uname -r' or 'rpm -qf /'
-- We probably need some devtoolset compiler
CMake Warning at CMakeLists.txt:294 (MESSAGE):
Could not find devtoolset gcc
-- MySQL 8.0.22
-- Xtrabackup 8.0.22-15
-- Source directory xxxx
-- Binary directory xxxx
CMake Error at CMakeLists.txt:399 (MESSAGE):
Please do not build in-source. Out-of source builds are highly
recommended: you can have multiple builds for the same source, and there is
an easy way to do cleanup, simply remove the build directory (note that
'make clean' or 'make distclean' does *not* work)
You *can* force in-source build by invoking cmake with
-DFORCE_INSOURCE_BUILD=1
解决方法:
rm -rf CMakeCache.txt
建个子目录 mkdir build
cd build 后 再 cmake .. (两个点)
本文档详述了在Linux环境下遇到的一些常见问题及其解决方案,包括:删除boost库并重新安装,使用yuminstallboost-devel进行安装;查看boost版本;解决编译错误如找不到bzip2头文件,通过yuminstallbzip2-devel安装;处理cmake找不到路径的问题,通过卸载重装指定目录;以及解决Xtrabackup编译失败的问题,提供清理CMakeCache.txt和建立独立构建目录的方法。
3958

被折叠的 条评论
为什么被折叠?



