安装mysql5.6.14+sphihxSE时cmake编译错误的解决办法

[root@localhost mysql-5.6.14] cp -R sphinx-VERSION/mysqlse mysql-VERSION/storage/sphinx
[root@localhost mysql-5.6.14] cd mysql-VERSION
[root@localhost mysql-5.6.14]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql/ -DCMAKE_BUILD_TYPE=Release -DWITH_SPHINX_STORAGE_ENGINE=1

-- Running cmake version 2.6.4

CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.

Missing variable is:

CMAKE_C_COMPILER_ENV_VAR

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.

Missing variable is:

CMAKE_C_COMPILER

CMake Error: Could not find cmake module file:/root/mysql-5.5.31/CMakeFiles/CMakeCCompiler.cmake

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.

Missing variable is:

CMAKE_CXX_COMPILER_ENV_VAR

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.

Missing variable is:

CMAKE_CXX_COMPILER

CMake Error: Could not find cmake module file:/root/mysql-5.5.31/CMakeFiles/CMakeCXXCompiler.cmake

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage

CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

-- Configuring incomplete, errors occurred!

解决办法:(用google搜索了下,大概都说有的没有安装gcc or g++,我确认安装以后)

[root@localhost mysql-5.6.14]# yum install make

mysql 5.5 缺少ncurses-devel

CMake Error at cmake/readline.cmake:83 (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:127 (FIND_CURSES)

cmake/readline.cmake:217 (MYSQL_USE_BUNDLED_LIBEDIT)

CMakeLists.txt:269 (MYSQL_CHECK_READLINE)

-- Configuring incomplete, errors occurred!

解决办法:
[root@localhost mysql-5.6.14]# yum install ncurses-devel
安装完以后 要删除cmake 缓存 再编译

[root@localhost mysql-5.6.14]# rm -rf CMakeCache.txt
[root@localhost mysql-5.6.14]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql5/ -DCMAKE_BUILD_TYPE=Release -DWITH_SPHINX_STORAGE_ENGINE=1
[root@localhost mysql-5.6.14]# make
[root@localhost mysql-5.6.14]# make install

发表评论

电子邮件地址不会被公开。 必填项已用*标注