未findCurses库

我试图构build5.6.4-labs-innodb-memcached,但遇到这个问题:

# cmake ./ -- MySQL 5.6.4-labs-innodb-memcached -- 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:263 (MYSQL_CHECK_READLINE) -- Configuring incomplete, errors occurred! 

libncurses5-dev已经安装,并设置了CURSES_USE_NCURSES = true,但是没有帮助。 有任何想法吗? 我已经编译过这个包,但是在另外一个机器上

编辑:

 /var/cache/apt/archives/libncurses5-dev_5.7+20101128-1_i386.deb /var/lib/dpkg/info/libncurses5.postinst /var/lib/dpkg/info/libncursesw5.list /var/lib/dpkg/info/ncurses-base.preinst /var/lib/dpkg/info/libncursesw5.postrm /var/lib/dpkg/info/libncursesw5.shlibs /var/lib/dpkg/info/libncursesw5.md5sums /var/lib/dpkg/info/libncurses5.symbols /var/lib/dpkg/info/ncurses-bin.preinst /var/lib/dpkg/info/ncurses-bin.list /var/lib/dpkg/info/libncurses5-dev.list /var/lib/dpkg/info/libncursesw5.symbols /var/lib/dpkg/info/libncursesw5.postinst /var/lib/dpkg/info/libncurses5-dev.md5sums /var/lib/dpkg/info/ncurses-base.conffiles /var/lib/dpkg/info/libncurses5.shlibs /var/lib/dpkg/info/ncurses-base.list /var/lib/dpkg/info/ncurses-bin.md5sums /var/lib/dpkg/info/libncurses5.md5sums /var/lib/dpkg/info/libncurses5.list /var/lib/dpkg/info/libncurses5.postrm /var/lib/dpkg/info/ncurses-base.md5sums /tmp/curses /usr/include/cursesf.h /usr/include/curses.h /usr/include/cursesw.h /usr/include/cursesp.h /usr/include/ncurses_dll.h /usr/include/ncurses.h /usr/include/cursesm.h /usr/include/cursesapp.h /usr/share/lintian/overrides/ncurses-bin /usr/share/lintian/overrides/ncurses-base /usr/share/man/man1/ncursesw5-config.1.gz /usr/share/man/man1/ncurses5-config.1.gz /usr/share/doc/libncurses5 /usr/share/doc/libncurses5/TODO.Debian /usr/share/doc/libncurses5/copyright /usr/share/doc/libncurses5/FAQ /usr/share/doc/libncurses5/changelog.Debian.gz /usr/share/doc/ncurses-bin /usr/share/doc/ncurses-bin/copyright /usr/share/doc/ncurses-bin/changelog.Debian.gz /usr/share/doc/libncurses5-dev /usr/share/doc/libncurses5-dev/copyright /usr/share/doc/libncurses5-dev/changelog.Debian.gz /usr/share/doc/libncursesw5 /usr/share/doc/libncursesw5/copyright /usr/share/doc/libncursesw5/changelog.Debian.gz /usr/share/doc/ncurses-base /usr/share/doc/ncurses-base/copyright /usr/share/doc/ncurses-base/changelog.Debian.gz /usr/bin/ncurses5-config /usr/bin/aptitude-curses /usr/bin/ncursesw5-config /usr/lib/libncurses++.a /usr/lib/libncurses.so /usr/lib/libncurses.a /usr/lib/libcurses.so /usr/lib/libcurses.a /usr/lib/python2.7/curses /usr/lib/python2.7/curses/textpad.pyc /usr/lib/python2.7/curses/has_key.pyc /usr/lib/python2.7/curses/wrapper.py /usr/lib/python2.7/curses/ascii.py /usr/lib/python2.7/curses/panel.pyc /usr/lib/python2.7/curses/has_key.py /usr/lib/python2.7/curses/__init__.py /usr/lib/python2.7/curses/textpad.py /usr/lib/python2.7/curses/panel.py /usr/lib/python2.7/curses/__init__.pyc /usr/lib/python2.7/curses/wrapper.pyc /usr/lib/python2.7/curses/ascii.pyc /usr/lib/python2.7/lib-dynload/_curses.so /usr/lib/python2.7/lib-dynload/_curses_panel.so /lib/libncursesw.so.5.7 /lib/libncurses.so.5 /lib/libncursesw.so.5 /lib/libncurses.so.5.7 

出于某种原因,CMake找不到包含和库。 通过运行cmake -D CMAKE_PREFIX_PATH=/path/to/curses/prefix .帮助它cmake -D CMAKE_PREFIX_PATH=/path/to/curses/prefix .

错误可能来自缓存文件。

删除CMakeCache.txt ,然后再试一次。

我不知道为什么它失败,但你可以使用错误信息“失踪…”,并设置手动丢失的东西。 即

 cmake -DCURSES_LIBRARY=/usr/lib/libncurses.so -DCURSES_INCLUDE_PATH=/usr/include . 

应该修复它。

也许你需要额外的ncurses文件。

 sudo yum install ncurses-devel 

然后删除CMakeCache.txt

再次尝试运行CMake。 这对我有效。

我有同样的问题,删除缓存文件为我工作。

这个为我工作

  1. locate libncurses.so

  2. cmake -DCURSES_LIBRARY=/PATH OF THE LOCATE RESULT CURSES_INCLUDE_PATH=/usr/include

sudo aptitude install libncurses-dev在Debian中sudo aptitude install libncurses-dev