Today I changed my workstation to Debian. As Ubuntu is not nearly stable. Now I installed VMware player. I started it and got a message "Before you can run VMware, several modules must be compiled and and loaded into the running kernel. Kernel headers for version2.6.32-5-amd64 were not found" , below a field were I can give a file location. What should I do now? I never faced such a situation.
Debian – VMwarePlayer on debian. Missing kernel modules
debiankernel-modulesvmware
Related Solutions
SOLVED!
Simple as that: /root/.bashrc
had this inside:
export GREP_OPTIONS='--color=always'
Changed it to:
export GREP_OPTIONS='--color=never'
...and restarted the root shell (of course; do not omit this step). Everything started working again. Both NVIDIA and VirtualBox kernel modules built from the first try. I am so happy! :-)
Then again though, I am slighly disappointed by the kernel build tools. They should know better and pass --color=never
everywhere they use grep
; or rather, store the old value of GREP_OPTIONS
, override it for the lifetime of the building process, then restore it.
I am hopeful that my epic one-week battle with this problem will prove valuable both to the community and the kernel build tools developers.
A very warm thanks to the people who were with me and tried to help.
(All credits go here: http://forums.gentoo.org/viewtopic-p-4156366.html#4156366)
I assume, the driver in question is compiled as a module. If you also built the prerequisites as modules, you can easily find them. All modules and their corresponding options are noted in the kernel makefiles. So you can just grep these for the module name.
But first, you need to find out, which modules your driver depends on. So issue a lsmod
and search for your driver, especially in the Column Used by
. I, for example use the rt2800usb
driver.
$ lsmod | grep rt2800usb
rt2800usb 15392 0
rt2x00usb 8306 1 rt2800usb
rt2800lib 59262 1 rt2800usb
rt2x00lib 34431 3 rt2x00usb,rt2800lib,rt2800usb
usbcore 146570 7 rt2x00usb,rt2800usb
This tells me that my driver needs the modules rt2x00usb
, rt2800lib
, rt2x00lib
and usbcore
. Now I search the Makefiles for them. Note the leading space and trailing .o
in the search strings
$ fgrep -r --include=Makefile ' usbcore.o'
drivers/usb/core/Makefile:obj-$(CONFIG_USB) += usbcore.o
$ grep -Pr --include=Makefile ' rt2(x|8)00(usb|lib)\.o'
drivers/net/wireless/rt2x00/Makefile:obj-$(CONFIG_RT2X00_LIB) += rt2x00lib.o
drivers/net/wireless/rt2x00/Makefile:obj-$(CONFIG_RT2X00_LIB_USB) += rt2x00usb.o
drivers/net/wireless/rt2x00/Makefile:obj-$(CONFIG_RT2800_LIB) += rt2800lib.o
drivers/net/wireless/rt2x00/Makefile:obj-$(CONFIG_RT2800USB) += rt2800usb.o
And there we have the config options needed to build those modules. If you cannot instantly find the culprit, try to go a level deeper and search for the dependencies of the dependencies... If you can guess the name, this may help for built-in objects, too (contrary to modules).
(All command line outputs in this post were slightly condensed and reformatted for better readability.)
Best Answer
In order to compile kernel modules for your running kernel, you need install the kernel headers. The following command should work: