【make menuconfig出错,ncurses安装失败】 内核配置

解决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... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package ncurses-devel


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

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package ncurses is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: 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,就可以正常进入内核配置了。

  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值