Linux 未找到 Curses 库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8192287/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 02:22:42  来源:igfitidea点击:

Curses library not found

mysqllinuxcmakencursescurses

提问by Roman Newaza

I'm trying to build 5.6.4-labs-innodb-memcached, but having this issue:

我正在尝试构建 5.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 is installed and CURSES_USE_NCURSES=true is set, but it doesn't help. Any ideas? I have already compiled this package, but it was on the other machine...

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

EDITED:

编辑:

/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

采纳答案by arrowd

For some reason, CMake can't find includes and libraries. Help it by running cmake -D CMAKE_PREFIX_PATH=/path/to/curses/prefix .

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

回答by Vladislav Vaintroub

I do not know why is it failing, but you can use error message "missing ..." and set what is missing manually. I.e

我不知道为什么会失败,但是您可以使用错误消息“missing ...”并手动设置缺少的内容。IE

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

should fix it.

应该修复它。

回答by Tony Lee

The error may be from cache file.

错误可能来自缓存文件。

Delete CMakeCache.txt, then try again.

删除CMakeCache.txt,然后重试。

回答by arcdegree

Perhaps you need additional ncurses files.

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

sudo yum install ncurses-devel 

Then delete CMakeCache.txt

然后删除CMakeCache.txt

Try again to run CMake. This worked for me.

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

回答by user3016569

I had the same problem, Deleting the cache file worked for me.

我遇到了同样的问题,删除缓存文件对我有用。

回答by Hamdi Charef

This one works for me

这个对我有用

  1. locate libncurses.so

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

  1. locate libncurses.so

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

回答by LCB

sudo aptitude install libncurses-devin Debian.

sudo aptitude install libncurses-dev在 Debian 中。