有个程序要编译的时候,cmake出现了错误
Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
得知是缺少libncurses5-dev库,在网上下载一个.deb文件安装报了错
dpkg: dependency problems prevent configuration of libncurses5-dev:amd64:
libncurses5-dev:amd64 depends on libtinfo5 (= 6.1-1ubuntu1); however:
Version of libtinfo5:amd64 on system is 6.1+20181013-2+deb10u1.
libncurses5-dev:amd64 depends on libncurses5 (= 6.1-1ubuntu1); however:
Version of libncurses5:amd64 on system is 6.1+20181013-2+deb10u1.
libncurses5-dev:amd64 depends on libtinfo-dev (= 6.1-1ubuntu1); however:
Package libtinfo-dev is not installed.
dpkg: error processing package libncurses5-dev:amd64 (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.8.5-2) ...
Errors were encountered while processing:
libncurses5-dev:amd64
乍一看是libtinfo-dev没有安装,故根据百度https://blog.youkuaiyun.com/isco22/article/details/89846696找到了依赖库安装地址,下载后,安装失败。
dpkg: dependency problems prevent configuration of libtinfo-dev:amd64:
libtinfo-dev:amd64 depends on libtinfo5 (= 6.1-1ubuntu1.18.04); however:
Version of libtinfo5:amd64 on system is 6.1+20181013-2+deb10u1.
dpkg: error processing package libtinfo-dev:amd64 (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libtinfo-dev:amd64
这样注意到了(= 6.1-1ubuntu1.18.04)似乎是需要安装对应的版本,而下面的版本是当前系统版本,不对应,所以安装出错。则再下载libtinfo库安装成功后,libtinfo-dev也安装成功了。
这样依次去看libncurses5-dev对应的库的版本是否都是匹配的,若匹配成功,则可顺利安装。