当前位置: 技术问答>linux和unix
Linux编译出错,什么原因?100分奉上!
来源: 互联网 发布时间:2017-01-02
本文导语: 本帖最后由 sping_sun 于 2011-08-16 11:41:32 编辑 大家好: 我在进行Linux内核编译时,出现下面错误,是什么原因啊,请高手指教一下: [root@localhost linux]# make menuconfig HOSTCC scripts/basic/fixdep In file included from /...
我在进行Linux内核编译时,出现下面错误,是什么原因啊,请高手指教一下:
[root@localhost linux]# make menuconfig
HOSTCC scripts/basic/fixdep
In file included from /usr/include/sys/socket.h:35,
from /usr/include/netinet/in.h:24,
from /usr/include/arpa/inet.h:23,
from scripts/basic/fixdep.c:117:
/usr/include/bits/socket.h:304:24: asm/socket.h: 没有那个文件或目录
make[1]: *** [scripts/basic/fixdep] 错误 1
make: *** [scripts_basic] 错误 2
[root@localhost linux]#
谢谢了!
|
我看了 from /usr/include/sys/socket.h:35,
from /usr/include/netinet/in.h:24,
from /usr/include/arpa/inet.h:23,
from scripts/basic/fixdep.c:117:
/usr/include/bits/socket.h:304:24:
这这些地方的代码都是#include
缺少这个头文件
你可以在linux/include文件夹下面看看有无socket.h
如果没有你可以自己添加进去,或重新自己下个内核
from /usr/include/netinet/in.h:24,
from /usr/include/arpa/inet.h:23,
from scripts/basic/fixdep.c:117:
/usr/include/bits/socket.h:304:24:
这这些地方的代码都是#include
缺少这个头文件
你可以在linux/include文件夹下面看看有无socket.h
如果没有你可以自己添加进去,或重新自己下个内核
|
感觉你的目录结构是不是不完整啊?
|
内核源码貌似不全
|
/usr/include下的asm等链接没指向要升级的内核?
cd /usr/include
ln -s /urs/src/.../include/asm-i386 asm
ln -s /usr/src/.../include/linux linux
ln -s /usr/src/.../include/scsi scsi
cd /usr/include
ln -s /urs/src/.../include/asm-i386 asm
ln -s /usr/src/.../include/linux linux
ln -s /usr/src/.../include/scsi scsi
|
+1
|
感觉是链接的问题。。
|
也许是make menuconfig配置不对,或者别的问题。