cmake安装mysql编译提示错误,错误提示如下,请大家指教,谢谢!

-- 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=<directory>

This CMake script will look for boost in <directory>. If it is not there,
it will download and unpack it (in that directory) for you.

If you are inside a firewall, you may need to use an http proxy:

export http_proxy=http://example.com:80

Call Stack (most recent call first):
cmake/boost.cmake:259 (COULD_NOT_FIND_BOOST)
CMakeLists.txt:452 (INCLUDE)

-- Configuring incomplete, errors occurred!
See also "/root/mysql-5.7.7-rc/CMakeFiles/CMakeOutput.log".

错误提示里说你的计算机上没有一个可用的Boost库或版本太低,MySQL需要不低于Boost 1.57.0的版本。您应该尝试下载一个Boost,并且完成编译。

您应该会得到上面图片中的大部分文件,除了几个我自己添加的辅助编译的脚本。

完成之后请再尝试重新编译MySQL。

附注:编译后生成的二进制库保存在Boost根目录下\stage\lib中,请根据MySQL的编译步骤中的指示填写在Makefile里面或者加入环境变量(具体的我不太清楚,需要您视具体情况而定)。

温馨提示:答案为网友推荐,仅供参考
第1个回答  2017-08-02

[root@Lnmp mysql-5.7.9]# cmake \

-DCMAKE_INSTALL_PREFIX=/byrd/service/mysql-5.7.9 

-DMYSQL_DATADIR=/byrd/service/mysql-5.7.9/data 

-DMYSQL_UNIX_ADDR=/byrd/service/mysql-5.7.9/tmp/mysql.sock 

-DMYSQL_USER=mysql 

-DDEFAULT_CHARSET=utf8 

-DDEFAULT_COLLATION=utf8_general_ci 

-DENABLED_LOCAL_INFILE=ON 

-DWITH_INNOBASE_STORAGE_ENGINE=1 

-DWITH_FEDERATED_STORAGE_ENGINE=1 

-DWITH_BLACKHOLE_STORAGE_ENGINE=1 

-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 

-DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost



http://www.cnblogs.com/chunguang/p/5553301.html  文章来源。 这是需要一个boost 包 在 /usr/local/boost 此路径下, 在MYSQL 源码下载时,注意有个 是带

Generic Linux (Architecture Independent), Compressed TAR Archive
Includes Boost Headers    5.7.19    46.5M      \\注意这个说明

Download

(mysql-boost-5.7.19.tar.gz)    

相似回答