当前位置: 技术问答>linux和unix
linux2.6.26编译内核出错
来源: 互联网 发布时间:2017-05-02
本文导语: 最近在学习linux内核课程,需要编译内核,过程中遇到问题,make config之后显示如下问题: xiang@ubuntu:/usr/src/linux-2.6.26$ make config HOSTCC scripts/basic/fixdep In file included from /usr/include/i386-linux-gnu/bits/posix1_lim.h:157, ...
最近在学习linux内核课程,需要编译内核,过程中遇到问题,make config之后显示如下问题:
xiang@ubuntu:/usr/src/linux-2.6.26$ make config
HOSTCC scripts/basic/fixdep
In file included from /usr/include/i386-linux-gnu/bits/posix1_lim.h:157,
from /usr/include/limits.h:145,
from /usr/lib/gcc/i686-linux-gnu/4.4.7/include-fixed/limits.h:122,
from /usr/lib/gcc/i686-linux-gnu/4.4.7/include-fixed/syslimits.h:7,
from /usr/lib/gcc/i686-linux-gnu/4.4.7/include-fixed/limits.h:11,
from scripts/basic/fixdep.c:115:
/usr/include/i386-linux-gnu/bits/local_lim.h:39: fatal error: linux/limits.h: 没有那个文件或目录
compilation terminated.
make[1]: *** [scripts/basic/fixdep] 错误 1
make: *** [scripts_basic] 错误 2
求大神解答
xiang@ubuntu:/usr/src/linux-2.6.26$ make config
HOSTCC scripts/basic/fixdep
In file included from /usr/include/i386-linux-gnu/bits/posix1_lim.h:157,
from /usr/include/limits.h:145,
from /usr/lib/gcc/i686-linux-gnu/4.4.7/include-fixed/limits.h:122,
from /usr/lib/gcc/i686-linux-gnu/4.4.7/include-fixed/syslimits.h:7,
from /usr/lib/gcc/i686-linux-gnu/4.4.7/include-fixed/limits.h:11,
from scripts/basic/fixdep.c:115:
/usr/include/i386-linux-gnu/bits/local_lim.h:39: fatal error: linux/limits.h: 没有那个文件或目录
compilation terminated.
make[1]: *** [scripts/basic/fixdep] 错误 1
make: *** [scripts_basic] 错误 2
求大神解答
|
这个百度找找,我遇到一些的错误百度大多能找到,在排除下。
|
直接用vi 打开config一样的
|
这个文字界面配置太慢喽。使用
# make menuconfig
界面配置,较快,对于普通用户,不用做任何修改,默认即可
# make menuconfig
界面配置,较快,对于普通用户,不用做任何修改,默认即可
|
少了文件,直接将PC中的limits.h拷贝到交叉编译工具里面就行了
|
你好像没有下载必要的编译开发包,试试把下面这两个包装上再编译一下
apt-get install build-essential kernel-package libncurses5-dev
apt-get install build-essential kernel-package libncurses5-dev