make menuconfig出错,ncurses安装失败

来源:互联网 发布:日语软件测试工程师 编辑:程序博客网 时间:2024/06/06 21:36

转自http://blog.csdn.net/feather_wch/article/details/50760328

解决Ubuntu使用make menuconfig配置Linux 内核时,出现缺少’ncurses-devel’库支持。

*** Unable to find the ncurses libraries or the*** required header files.*** 'make menuconfig' requires the ncurses libraries.****** Install ncurses (ncurses-devel) and try again.*** 

1.问题状况
一般情况下使用系统自带的软件管理器apt-get就可以安装了(sudo apt-get install ncurses-devel),但使用后却出现下面的错误提示:

Reading package lists... DoneBuilding dependency tree       Reading state information... DoneE: Unable to locate package ncurses-devel

试了另一条命令sudo apt-get install ncurses, 出现:

Reading package lists... DoneBuilding dependency tree       Reading state information... DonePackage ncurses is not available, but is referred to by another package.This may mean that the package is missing, has been obsoleted, oris only available from another sourceE: Package 'ncurses' has no installation candidate

2.解决方法
Linux几乎每个发行版都会有’ncurses’及’ncurses-devel’的安装包的,再根据上面第二条命令错误提示,“现在没有可用的软件包 ncurses,但是它被其它的软件包引用了。” 可以判定Ubuntu软件管理器服务端有作修改过。所以到 Ubuntu Package archive(http://packages.ubuntu.com/)搜索是否存在该安装包,用’ncurses-devel’作为关键字搜索,没有任何结果。搜索’ncurses’出现了很多返回结果。根据每个返回搜索结果的说明可以发现在Ubuntu中’ncurses-devel’是以’libncurses5-dev’命名的。

* sudo apt-get install libncurses5-dev (安装过程没有提示任何错误,安装成功)*
接着再试一下make menuconfig,就可以正常进入内核配置了。

原创粉丝点击