如果cmake提示下列错误:
......
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:409 (MYSQL_CHECK_EDITLINE)
-- Configuring incomplete, errors occurred!
Debian/Ubuntu下需要安装libncurses5-dev;Redhat下需要安装ncurses-devel ,检查是否安装了ncurses包,如下所示,
缺少ncurses-devel包。检查和安装该包:
rpm -qa | grep ncurses
rpm -ivh ncurses-devel
安装方法、
下载地址:
http://mirror.centos.org/centos/6/os/x86_64/Packages/ncurses-devel-5.7-4.20090207.el6.x86_64.rpm
http://mirror.centos.org/centos/6/os/x86_64/Packages/ncurses-libs-5.7-4.20090207.el6.x86_64.rpm
devel安装需要依赖libs,执行以下命令:
rpm -ivh ncurses-libs-5.7-4.20090207.el6.x86_64.rpm rpm -ivh ncurses-devel-5.7-4.20090207.el6.x86_64.rpm
安装了ncurses-devel包后,rm删除/soft/mysql-5.6.26/CMakeCache.txt,然后上述cmake重新编译,编译成功。
注意:
如果没有编译成功,需要重新编译,需要清除旧的对象文件和缓存信息。
# make clean
# rm -f CMakeCache.txt
# rm -rf /etc/my.cnf