mysql 설치 오류 CMake Error at cmake/boost.cmake

환경 : CentOS7 64bit

리눅스 레드헷기반의 centos7 설치 환경에서 APM(apache, php, mysql) 설치 중 발생된 상황

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 라이브러리를 참조하기 때문에 이부분을 컴파일 과정에서 추가해줘야된다.

cd /usr/local/src/

wget http://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz

tar xvfz boost_1_59_0.tar.gz

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

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 && make && make install

위 옵션을 보면 알겠지만 mysql cmake 설치 옵션중에 아래 옵션을 추가해줘야 된다.

-DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/src/boost_1_59_0

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 항목은 *(으)로 표시합니다