MySQL5.7源码编译——报错 CMake Error at cmake/boost.cmake:81 (MESSAGE)

-- Running cmake version 3.10.0
...... 中间省略
-- BOOST_VERSION_NUMBER is #define BOOST_VERSION 106501
CMake Warning at cmake/boost.cmake:266 (MESSAGE):
  **Boost minor version found is 65 we need 59** //**此为关键问题**
Call Stack (most recent call first):
  CMakeLists.txt:491 (INCLUDE)

-- BOOST_INCLUDE_DIR D:/develop/7.lang/boost_1_65_1
-- LOCAL_BOOST_DIR D:/develop/7.lang/boost_1_65_1
-- LOCAL_BOOST_ZIP LOCAL_BOOST_ZIP-NOTFOUND
-- Could not find (the correct version of) boost.
-- MySQL currently requires boost_1_59_0

CMake Error at cmake/boost.cmake:81 (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:269 (COULD_NOT_FIND_BOOST)
  CMakeLists.txt:491 (INCLUDE)


-- Configuring incomplete, errors occurred!

从错误日志来看,应该是boost的版本不对,MySQL5.7源码编译需要的boost_1_59_0,当前安装的版本是1_65_1。然后再看下源码确认下,打开{源码包目录}/cmake/boost.cmake,定位到269行。

IF(NOT BOOST_MINOR_VERSION EQUAL 59)
  MESSAGE(WARNING "Boost minor version found is ${BOOST_MINOR_VERSION} "
    "we need 59"
    )
  COULD_NOT_FIND_BOOST() //此处为错误日志打出来的地方
ENDIF()

应该就是版本问题,下载boost_1_59_0重新编译下试试。

另外一篇博客会完整记录下编译过程。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值