CentOS安装MySQL时报Curses library not found异常

分类:CentOS运维 阅读:88842 次

信息如

  1. CMakeErroratcmake/readline.cmake:83(MESSAGE):
  2. Curseslibrarynotfound.Pleaseinstallappropriatepackage
  3. removeCMakeCache.txtandreruncmake.OnDebian/Ubuntu,packagenameislibncurses5-dev,onRedhatandderivatesitisncurses-devel.
  4. CallStack(mostrecentcallfirst):
  5. cmake/readline.cmake:127(FIND_CURSES)
  6. cmake/readline.cmake:217(MYSQL_USE_BUNDLED_LIBEDIT)
  7. CMakeLists.txt:268(MYSQL_CHECK_READLINE)
  8. --Configuringincomplete,errorsoccurred!

解决方法

Step1:
# rm CMakeCache.txt


Step2:
# yum install ncurses-devel


Step3:
# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_MEMORY_STORAGE_ENGINE=1 \
-DWITH_READLINE=1 \
-DENABLED_LOCAL_INFILE=1 \
-DMYSQL_DATADIR=/usr/local/mysql/data \
-DMYSQL_USER=mysql \
-DMYSQL_TCP_PORT=3306