刚才,我尝试在 Ubuntu 13.10 中安装 Jungo WinDriver。但我对如何安装 version.h 的手册感到困惑:
Install version.h:
The file version.h is created when you first compile the Linux kernel
source code. Some distributions provide a compiled kernel without the
file version.h. Look under /usr/src/linux/include/linux to see whether
you have this file. If you do not, follow these steps: Become super
user: $ su Change directory to the Linux source directory:
# cd /usr/src/linux Type:
# make xconfig Save the configuration by choosing Save and Exit. Type:
# make dep Exit super user mode:
# exit
但是 shell 说:
警告:现在不需要 make dep。
然后,我发现 /usr/src/linux-headers-3.11.0.12-generic 中有一个 version.h,因此我输入:
/usr/src/windriver/redist# ./configure --with-kernel-source=/usr/src/linux-headers-3.11.0.12-generic
但是,winddriver 运行失败:
USE_KBUILD = yes
checking for cpu architecture... x86_64
checking for WinDriver root directory... /usr/src/WinDriver
checking for linux kernel source... found at /usr/src/linux
checking for lib directory... ln -sf $(ROOT_DIR)/lib/$(SHARED_OBJECT)_32.so /usr/lib/$(SHARED_OBJECT).so; ln -s /usr/lib /usr/lib64; ln -sf $(ROOT_DIR)/lib/$(SHARED_OBJECT).so /usr/lib64/$(SHARED_OBJECT).so
checking which directories to include... -I/usr/src/linux/include
checking linux kernel version... 3.11.10.6
checking for modules installation directory... /lib/modules/3.11.0-12-generic/kernel/drivers/misc
checking output directory... LINUX.3.11.0-12-generic.x86_64
checking target... LINUX.3.11.0-12-generic.x86_64/windrvr6_usb.ko
checking for regparm kernel option... find: `/usr/src/WinDriver/redist/.tmp_driver/.tmp_versions': No such file or directory
0
checking for modpost location... /usr/src/linux/scripts/mod/modpost
configure.usb: creating ./config.status
config.status: creating makefile.usb.kbuild
checking for cpu architecture... x86_64
checking for WinDriver root directory... /usr/src/WinDriver
checking for linux kernel source... found at /usr/src/linux
checking for lib directory... ln -sf $(ROOT_DIR)/lib/$(SHARED_OBJECT)_32.so /usr/lib/$(SHARED_OBJECT).so; ln -s /usr/lib /usr/lib64; ln -sf $(ROOT_DIR)/lib/$(SHARED_OBJECT).so /usr/lib64/$(SHARED_OBJECT).so
checking which directories to include... -I/usr/src/linux/include
checking linux kernel version... 3.11.10.6
checking for modules installation directory... /lib/modules/3.11.0-12-generic/kernel/drivers/misc
checking output directory... LINUX.3.11.0-12-generic.x86_64
checking target... LINUX.3.11.0-12-generic.x86_64/windrvr6.ko
checking for regparm kernel option... find: `/usr/src/WinDriver/redist/.tmp_driver/.tmp_versions': No such file or directory
0
checking for right linked object... windrvr_gcc_v3.a
checking for modpost location... /usr/src/linux/scripts/mod/modpost
configure.wd: creating ./config.status
config.status: creating makefile.wd.kbuild
问题是什么?
答案1
您必须为您的系统安装内核头文件包。
sudo apt-get install linux-headers-$(uname -r)
或者首先输入以下命令获取内核版本:
uname -r
在下面的代码中,替换$version
为您的内核版本
sudo apt-get install linux-headers-$version