Linux make menuconfig 的那些事情
2015-11-05 12:37
811 查看
Linux是一个通用的操作系统,但缺省配置并不是内核都加载了所有的驱动,因而提供了一个供用户裁剪内核的方案。
那就是通过make menuconfig 改变配置,然后重新编译,安装。
但是对于初学者却经常会遇到很多莫名的问题:
初学者,不经思考,直接运行这个命令,往往会得到如下的错误提示。
root@localhost kernel]# make menuconfig
make: *** No rule to make target `menuconfig'. Stop.
仔细思考一下,就应该能够推测出这个错误,是目录不对导致的。Linux 内核源码一般位于/usr/src/kernels/对应的release 目录下。
以Centos 7 为例:
#cd /usr/src/kernels/3.10.0-123.el7.x86_64
#make menuconfig
就可以弹出config 配置界面。
但有时的时候会弹出如下错误:
[root@localhost 3.10.0-123.el7.x86_64]# make menuconfig
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1
make: *** [menuconfig] Error 2
这个是由于缺少 ncurses-devel 库导致的。
执行
yum install -y ncurses-devel 后
即可解决这个错误。
make menuconfigure修改后的结果存放在代码根目录的.config文件,可以打开这个文件,查看对应的项目有没有修改正确。
那就是通过make menuconfig 改变配置,然后重新编译,安装。
但是对于初学者却经常会遇到很多莫名的问题:
初学者,不经思考,直接运行这个命令,往往会得到如下的错误提示。
root@localhost kernel]# make menuconfig
make: *** No rule to make target `menuconfig'. Stop.
仔细思考一下,就应该能够推测出这个错误,是目录不对导致的。Linux 内核源码一般位于/usr/src/kernels/对应的release 目录下。
以Centos 7 为例:
#cd /usr/src/kernels/3.10.0-123.el7.x86_64
#make menuconfig
就可以弹出config 配置界面。
但有时的时候会弹出如下错误:
[root@localhost 3.10.0-123.el7.x86_64]# make menuconfig
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1
make: *** [menuconfig] Error 2
这个是由于缺少 ncurses-devel 库导致的。
执行
yum install -y ncurses-devel 后
即可解决这个错误。
make menuconfigure修改后的结果存放在代码根目录的.config文件,可以打开这个文件,查看对应的项目有没有修改正确。
相关文章推荐
- 使用GCC内置函数代替Linux内核asm/atomic.h头文件
- Centos6 install mysql
- linux下的线程的创建退出及回收
- Centos7下挂载NTFS文件系统
- Linux 的cp命令
- 在CentOS 6.5 中安装JDK 1.7 + Eclipse并配置opencv的java开发环境(二)
- CentOS 6.7 安装配置nfs 服务
- centos 6.5ssh无密钥登陆失败问题解决
- Linux命令-cat
- linux gcc版本升级4.8.2 string版本太旧问题解决方法
- Linux系统中df命令的一些使用实例整理汇总
- Linux测量kernel子模块加载时间的方法
- Linux 交换eth0和eth1
- ARM Linux学习,从宿主机传程序到ARM——环境搭建1
- crontab 启动 、运行 和编辑 查看
- 【C/C++】Linux下使用system()函数一定要谨慎
- linux 得到内网外网ip
- 【嵌入式linux】(第三步):安装串口终端 (ubuntu安装minicom串口终端)
- mysql linux 下面安装
- linux power state