Installing MySQL from source: Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)

Just find this a terrible problem with my CentOS having x86_64 architecture and cmake failed to find the right library for Curses. Anyway, this is how I got the error when trying to build MySQL from source,

$ cmake .
-- Running cmake version 2.6.4
-- MySQL 5.6.12
-- Packaging as: mysql-5.6.12-Linux-x86_64
-- HAVE_VISIBILITY_HIDDEN
-- HAVE_VISIBILITY_HIDDEN
-- HAVE_VISIBILITY_HIDDEN
-- 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:332 (MYSQL_CHECK_EDITLINE)


-- Configuring incomplete, errors occurred!

I have already installed my curses library thru yum as,

$> sudo yum -y install ncurses.x86_64 ncurses-devel.x86_64  ncurses-libs.x86_64 ncurses-static.x86_64 


Still, got the error above,

to fix it, just try,

$ cmake -DCURSES_LIBRARY=/usr/lib64/libncurses.so -DCURSES_INCLUDE_PATH=/usr/include .

and that will work. Hope that helps,

Comments

  1. I need help on this issue as well on Fedora 20. I am trying to install mysql using the source code. This is what I have:

    Running cmake version 2.8.12.2
    Cmake Warning (dev) at CMakeLists.txt:187 (INCLUDE):
    Syntax Warning in cmake code at

    /home/stephanie/mysql-5.6.17/cmake/ssl.cmake:237:55

    Argument not separated from preceding token by whitespace.
    This warning is for project developers. Use -Wno-dev to suppress it.

    MYSQL 5.6.17
    Packaging as: mysql-5.6.17-Linux-x86_64
    HAVE_VISIBILITY_HIDDEN
    HAVE_VISIBILITY_HIDDEN
    HAVE_VISIBILITY_HIDDEN
    Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
    CMake Error at cmake/readline.cmake:85(MESSAGE):
    Curses library not found. Please install apporopriate package,

    remove CmakeCache.txt and rerun cmak.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:411 (MYSQL_CHECK_EDITLINE)

    Configuring incomplete, errors occurred!
    See also “/home/stephanie/mysql-5.6.17/CMakeFiles/CMakeOutput.log”.
    See also “/home/stephanie/mysql-5.6.17/CMakeFiles/CMakeError.log”.
    You have changed variabled that require your cache to be deleted.
    Configure will be re-run and you may have to reset some variables.
    The following variables have changed:
    CMAKE_C_COMPLIER= gcc-4.8.2
    CMAKE_CXX_COMPILER= g++-4.8.2

    Generating done
    Build files have been written to: /home/stephanie/mysql-5.6.17

    After I used the command: cmake -DCURSES_LIBRARY=/usr/lib64/libncurses.so -DCURSES_INCL
    UDE_PATH=/usr/include .

    Running cmake version 2.8.12.2
    Cmake Warning (dev) at CMakeLists.txt:187 (INCLUDE):
    Syntax Warning in cmake code at

    /home/stephanie/mysql-5.6.17/cmake/ssl.cmake:237:55

    Argument not separated from preceding token by whitespace.
    This warning is for project developers. Use -Wno-dev to suppress it.

    MYSQL 5.6.17
    Packaging as: mysql-5.6.17-Linux-x86_64
    HAVE_VISIBILITY_HIDDEN
    HAVE_VISIBILITY_HIDDEN
    HAVE_VISIBILITY_HIDDEN
    Using cmake version 2.8.12.2
    Not building NDB
    Library mysqlclient depends on OSLIBS -lpthread;m;dl
    Warning: Bison executable not found in PATH
    Library mysql server depends on OSLIBS -lpthread;m;crypt;dl
    Configuring done
    Generating done
    Build files have been written to: /home/stephanie/mysql-5.6.17

    ReplyDelete

Post a Comment

Popular posts from this blog

Converting sectors into MB - Useful in understanding the sectors in iostat in Linux

What is Disk Contention?