[MySQL][Error] Configure시 CMake Boost 처리 방법

1. 문제점

Centos 7 + apache 2.4.x + php 7.x + mysql 5.7.x 설치 도중 mysql 설치과정에서 아래와 같은 에러메시지를 발견하였습니다.

-- Running cmake version 2.8.11
-- Could NOT find Git (missing:  GIT_EXECUTABLE)
-- Configuring with MAX_INDEXES = 64U
-- SIZEOF_VOIDP 8
-- MySQL 5.7.11
-- Packaging as: mysql-5.7.11-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_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:238 (COULD_NOT_FIND_BOOST)
  CMakeLists.txt:443 (INCLUDE)


-- Configuring incomplete, errors occurred!

 

 

 

2. 해결방법

mysql 5.7.x 설치시 boost 라이브러리를 참조하기 때문에 이부분을 컴파일 과정에서 추가해줘야된다.

shell > cd /usr/local/src/
shell > wget http://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz
shell > tar xvfz boost_1_59_0.tar.gz


mysql 설치디렉토리로 이동한후에

shell> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql-5.7.11 \
-DMYSQL_DATADIR=/usr/local/mysql-5.7.11/data \
-DDOWNLOAD_BOOST=1 \
-DWITH_BOOST=/usr/local/src/boost_1_59_0 \
-DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EXTRA_CHARSETS=all \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DMYSQL_UNIX_ADDR=/tmp/mysql.sock \
-DSYSCONFDIR=/etc \
-DMYSQL_TCP_PORT=3306 \
shell> make && make install 

Designed by JB FACTORY