Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am installing MySQL Server from the source distribution which I downloaded from:

http://dev.mysql.com/downloads/mysql/#downloads.

I have downloaded the file (mysql-5.5.19.tar.gz).

I am using Debian/Ubuntu Machine. I am following the instructions as given in MySQL Documentation.

After issuing cmake . at the shell I am getting the following error:

-- MySQL 5.5.19
-- Could NOT find Curses  (missing:  CURSES_LIBRARY CURSES_INCLUDE_PATH)
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:257 (MYSQL_CHECK_READLINE)


-- Configuring incomplete, errors occurred!

Why am I getting this error?

share|improve this question
    
Just a recommendation : You should not use source-compiled versions of MySQL because certain compiler optimizations that RPM installations provide would be your responsibility to set before compiling. In most cases, you get slower and/or more bloated mysql binaries. You should install RPM or tar versions instead. –  RolandoMySQLDBA Jan 6 '12 at 17:13
    
You should probably ask yourself why you are building from source at all given the proliferation of packages available. I can't think of any reason why it would make sense to build from source unless you are actually developing MySQL. –  Aaron Brown Jan 23 '12 at 21:33
add comment

2 Answers 2

The clue is in the error message (which I also encountered today):

  1. install the correct Curses library. If you're on Debian/Ubuntu then install libncurses5-dev ( use sudo apt-get install libncurses5-dev )
  2. then remove CMakeCache.txt and rerun cmake. i.e. just do rm -f CMakeCache.txt.
  3. Re-run cmake .
share|improve this answer
    
Important point for me rm -f CMakeCache.txt :) thanks –  Mostafa Shahverdy May 30 at 13:50
add comment

Your build can't find ncurses. Either you don't have it installed or it cant be found where it is installed.

If you don't have it, simply download it, build it, install it, and make sure LD_LIBRARY_PATH can find it.

If for any reason cmake still cant see it, you can pass the lib and include directories to cmake at runtime, such as:

shell> cmake -DCURSES_LIBRARY=/path/to/lib/libncurses.a -DCURSES_INCLUDE_PATH=/path/to/include/ .

Note, unlike any sane tool, you actually have to pass it the full path to the specific lib, right up to and including the library name itself.

Ignore the comments above regarding building from RPM; package managers are for hobbyists and power users, not professionals; you're doing it right.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.