CMake Error at cmake/boost.cmake:76 (MESSAGE)

在源碼安裝mysql5.7系列時,出現以下錯誤:mysql

錯誤現象:sql

CMake Error at cmake/boost.cmake:76 (MESSAGE):ide

  You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=<directory>spa

 

  This CMake script will look for boost in <directory>.  If it is not there,orm

  it will download and unpack it (in that directory) for you.blog

 

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

 

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

 

Call Stack (most recent call first):rem

  cmake/boost.cmake:228 (COULD_NOT_FIND_BOOST)get

  CMakeLists.txt:452 (INCLUDE)

-- Configuring incomplete, errors occurred!


緣由分析:沒有boost包

解決方法:

一、在預編譯時添加相應的選項:cmake .    -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost

[root@kongxl mysql-5.7.6-m16]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/data/mysql -DWITH_INNOBASE_STORAGE_ENGINE=1 -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost


二、或者下載一個boost包,放到/usr/local/boost目錄下,而後在cmake後面加選項-DWITH_BOOST=/usr/local/boost

[root@kongxl mysql-5.7.6-m16]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/data/mysql -DWITH_INNOBASE_STORAGE_ENGINE=1 -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_BOOST=/usr/local/boost

相關文章
相關標籤/搜索