这篇文章主要是关于MySQL在编译安装时,可能出现的错误的解决方法。MySQL正确的编译安装操作见前文《CentOS 7.1编译安装MySQL 5.7.7RC》。
1 没有安装MySQL所需要的boost库
测试发现编译MySQL5.7以及更高的版本时,都需要下载并引用或者直接安装boost库,否则在执行cmake命令时会报如下错误:
-- Running cmake version 3.2.1
-- Configuring with MAX_INDEXES = 64U
-- SIZEOF_VOIDP 8
-- MySQL 5.7.6-m16 [MySQL版本]
-- Packaging as: mysql-5.7.6-m16-Linux-x86_64
-- Looked for boost/version.hpp in and
-- BOOST_INCLUDE_DIR BOOST_INCLUDE_DIR-NOTFOUND
-- LOCAL_BOOST_DIR
-- LOCAL_BOOST_ZIP
-- Could not find (the correct version of) boost. [关键错误信息]
-- MySQL currently requires boost_1_57_0 [解决办法]
CMake Error at cmake/boost.cmake:76 (MESSAGE): [具体错误和解决方法]
You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=
This CMake script will look for boost in . If it is not there,
it will download and unpack i