標籤:unknown exp Requires cmake 5.7 director first exe script
錯誤1
- Running cmake version 2.8.11-- Could NOT find Git (missing: GIT_EXECUTABLE)-- Configuring with MAX_INDEXES = 64U-- The C compiler identification is unknown-- The CXX compiler identification is unknownCMake Error: your C compiler: "CMAKE_C_COMPILER-NOTFOUND" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name.CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.CMake Error at cmake/os/Linux.cmake:41 (MESSAGE): Unsupported compiler!Call Stack (most recent call first): CMakeLists.txt:162 (INCLUDE)
解決辦法:yum install gcc gcc-c++
錯誤二:
- Could not find (the correct version of) boost.-- MySQL currently requires boost_1_59_0CMake 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:80Call Stack (most recent call first): cmake/boost.cmake:238 (COULD_NOT_FIND_BOOST) CMakeLists.txt:451 (INCLUDE)
解決辦法:從MySQL 5.7.5開始Boost庫是必需的
下載 mysql-boost-5.7.12.tar.g 在 cmake 指定參數 -DWITH_BOOST=boost/boost_1_59_0/
或直接cmake指定參數 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=<directory> 系統會下載 boost
錯誤三:
-- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)CMake Error at cmake/readline.cmake:64 (MESSAGE): Curses library not found. Please install appropriate package, remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.Call Stack (most recent call first): cmake/readline.cmake:107 (FIND_CURSES) cmake/readline.cmake:181 (MYSQL_USE_BUNDLED_EDITLINE) CMakeLists.txt:479 (MYSQL_CHECK_EDITLINE)
解決辦法:yum install ncurses-devel
安裝了ncurses-devel包後,刪除CMakeCache.txt,然後重新編譯,編譯成功
MYSQL源碼編譯