关于安装软件时的提示Version.h不存在的问题!

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
czjhero
帖子: 42
注册时间: 2007-01-02 5:04

关于安装软件时的提示Version.h不存在的问题!

#1

帖子 czjhero » 2007-01-07 0:37

安装软件时提示:
The file /usr/src/linux/include/linux/version.h does not exist.
Please install the package with full kernel sources for your distribution
or use --with-kernel=dir option to specify another directory with kernel
sources (default is /usr/src/linux).
是什么原因?我要怎么做,或下载一些什么呢?
czjhero
帖子: 42
注册时间: 2007-01-02 5:04

#2

帖子 czjhero » 2007-01-07 0:38

在./configure后全部的提示:
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether time.h and sys/time.h may both be included... yes
checking whether gcc needs -traditional... no
checking for current directory... /home/ediny/Desktop/alsa-driver-1.0.10
checking cross compile...
checking for directory with kernel source... /usr/src/linux
checking for directory with kernel build...
checking for kernel linux/version.h... no
The file /usr/src/linux/include/linux/version.h does not exist.
Please install the package with full kernel sources for your distribution
or use --with-kernel=dir option to specify another directory with kernel
sources (default is /usr/src/linux).
头像
arli
帖子: 194
注册时间: 2006-11-24 11:00
来自: 太阳系第3行星
联系:

#3

帖子 arli » 2007-01-07 1:17

确认你的系统里有头文件:

ls -l /usr/src

如果没有瞧见名为 linux 的符号文件,或并指向不存在的目录
就执行一次

sudo apt-get install linux-headers-$(uname -r)

该目录里存着linux kernel 的源代码和头文件为大多数 make 所必须,同时里面还保存着编译内核时的 .config 文件,如果你的kernel 是自己编译的的话,必须确保源文件存在并且有 .config(make menuconfig 时生成的) 文件
要爱护linux 就象爱护我们的庄稼地一样
回复