当前位置: 技术问答>linux和unix
Linux7.3编译内核问题!在线等待立马给分!!!!!!!!
来源: 互联网 发布时间:2015-02-08
本文导语: 我用的是RedHat7.3,在/usr/src下有一RedHat目录,但该目录下只有子目录没有文件,于是我如下操作:(我下载了Linux-2.5.34的内核) 1、cp linux-2.5.34 /usr/src 2、cd /usr/src 3、tar xvzf linux-2.5.34.tar.gz 4、mv linux-2.5.34 linux 5、cd /u...
我用的是RedHat7.3,在/usr/src下有一RedHat目录,但该目录下只有子目录没有文件,于是我如下操作:(我下载了Linux-2.5.34的内核)
1、cp linux-2.5.34 /usr/src
2、cd /usr/src
3、tar xvzf linux-2.5.34.tar.gz
4、mv linux-2.5.34 linux
5、cd /usr/include
rm -rf asm linux scsi
ln -s /usr/src/linux/include/asm-i386 asm
ln -s /usr/src/linux/include/linux linux
ln -s /usr/src/linux/include/scsi scsi
6、cd /usr/src/linux
make mrproper ---->该步操作成功
7、make menuconfig ---->该步操作也成功,提示信息如下:
saving your kerner configuration...
*** End of Linux kernel configuration.
*** Check the top-level Makefile for additional configuration.
*** Nex,you must run 'make dep'
8、[root@localhost linux]# make dep ---->该步操作不成功,提示信息如下:
make[1]: Entering directory '/usr/src/linux'
make[2]:Entering directory '/usr/src/linux/scripts'
gcc -Wp,-MD,./.split-include.d -Wall -Wstrict-prototypes -o2 -fomit- frame-pointer -o split-include split -include.c
in file included from /usr/include/linux/errno.h:4,
from /usr/include/bits/errno.h:25,
from /usr/include/error.h:36,
from split-include.c:26:
/usr/include/asm/errno.h:31: asm-generic/errno.h: no such file or directory
maje[2]: ***[split-include] error 1
make[2]: Leaving director '/usr/src/linux/scripts'
make[1]:***'scripts] Error 2
make[1]:leaving directory '/usr/src/linux'
make: ***[.hdepend] error 2
请问这是什么原因,是不是我前面操作有问题?
1、cp linux-2.5.34 /usr/src
2、cd /usr/src
3、tar xvzf linux-2.5.34.tar.gz
4、mv linux-2.5.34 linux
5、cd /usr/include
rm -rf asm linux scsi
ln -s /usr/src/linux/include/asm-i386 asm
ln -s /usr/src/linux/include/linux linux
ln -s /usr/src/linux/include/scsi scsi
6、cd /usr/src/linux
make mrproper ---->该步操作成功
7、make menuconfig ---->该步操作也成功,提示信息如下:
saving your kerner configuration...
*** End of Linux kernel configuration.
*** Check the top-level Makefile for additional configuration.
*** Nex,you must run 'make dep'
8、[root@localhost linux]# make dep ---->该步操作不成功,提示信息如下:
make[1]: Entering directory '/usr/src/linux'
make[2]:Entering directory '/usr/src/linux/scripts'
gcc -Wp,-MD,./.split-include.d -Wall -Wstrict-prototypes -o2 -fomit- frame-pointer -o split-include split -include.c
in file included from /usr/include/linux/errno.h:4,
from /usr/include/bits/errno.h:25,
from /usr/include/error.h:36,
from split-include.c:26:
/usr/include/asm/errno.h:31: asm-generic/errno.h: no such file or directory
maje[2]: ***[split-include] error 1
make[2]: Leaving director '/usr/src/linux/scripts'
make[1]:***'scripts] Error 2
make[1]:leaving directory '/usr/src/linux'
make: ***[.hdepend] error 2
请问这是什么原因,是不是我前面操作有问题?
|
应该是你下载的内核有问题,我了曾碰到过,重新下载新的内核文件,其实不一定都得把内核源码放在/usr/src目录下,任何目录都行!还有你也不用建立linux链接,只须建立asm linux scsi三链接即可,如果你有编译为模块,你得make moudles make modules_install,引导为lilo,则得make zlilo,make install(或者手工修改lilo.conf文件,然后.lilo重新安装lilo)