安装mysql5.6执行cmake后出现以下错误信息

-- Could NOT find Curses (missing:  CURSES_LIBRARY CURSES_INCLUDE_PATH) 
CMake Error at cmake/readline.cmake:85 (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:128 (FIND_CURSES)
  cmake/readline.cmake:202 (MYSQL_USE_BUNDLED_EDITLINE)
  CMakeLists.txt:421 (MYSQL_CHECK_EDITLINE)


-- Configuring incomplete, errors occurred!
See also "/liuzhen/mysql-5.6.35/CMakeFiles/CMakeOutput.log".
See also "/liuzhen/mysql-5.6.35/CMakeFiles/CMakeError.log".

说明未安装ncurses-devel

如果使用yum安装输入下面命令

[root@bogon liuzhen]# yum install ncurses-devel

yum安装完成后,重新执行cmake,问题不再出现。


注意事项:

如mysql安装失败重新编译时,需要清除旧的对象文件和缓存信息。

[root@bogon mysql-5.6.35]# make clean
[root@bogon mysql-5.6.35]# rm -f CMakeCache.txt
[root@bogon mysql-5.6.35]# rm -rf /etc/my.cnf



如果想要通过源码安装方式解决同样问题请往下看

下载地址:http://ftp.gnu.org/gnu/ncurses/

我选择的是最新版本:http://ftp.gnu.org/gnu/ncurses/ncurses-6.0.tar.gz

[root@bogon liuzhen]# tar -zxvf ncurses-6.0.tar.gz
[root@bogon liuzhen]# cd ncurses-6.0
[root@bogon liuzhen]# ./configure --with-shared --without-debug --without-ada --enable-overwrite  
[root@bogon liuzhen]#  make
[root@bogon liuzhen]#  make install