Problems with kernel header files during VMware installation on Linux

Source: Internet
Author: User

VMware's role does not need to be introduced, like dorainm, such as playing with the underlying system, often use vmware To Get A freeBSD, linux-2.4.x, linux-2.6.x and so on to play!

After installing vmware, run the vmware-config.pl, often stuck in the kernel header file here

None of the pre-built vmmon modules for VMware Workstation is suitable for your running kernel. Do you want this program to try to build the vmmon module for your system (you need to have a C compiler installed on your system)? [yes]
Using compiler "/usr/bin/gcc". Use environment variable CC to override.
What is the location of the directory of C header files that match your running kernel? [/usr/src/linux/include]
The path "/usr/src/linux/include" is not an existing directory.
What is the location of the directory of C header files that match your running kernel? [/usr/src/linux/include] /root/sources/linux-2.6.22.2/include

The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE) does not match your running kernel (version 2.6.22.2). Even if the module were to compile successfully, it would not load into the running kernel.
What is the location of the directory of C header files that match your running kernel? [/usr/src/linux/include]

Cool! The modification points to the Linux kernel folder I have compiled and used, but the error message is still returned (the Kernel used by dorainm is 2.6.22.2)

The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE) does not match your running kernel (version 2.6.22.2). Even if the module were to compile successfully, it would not load into the running kernel.

Open linux/version. h. The content is

#define LINUX_VERSION_CODE 132630
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

2.6.22 kernel = 2 <16 + 6 <8 + 22 = 2*65536 + 6*256 + 22 = 132630
Why is the version incorrect ?! Is the version algorithm different ?! Bc: who is holding my finger !)

Again, the version read by vmware, UTS_RELEASE! Add a line to linux/version. h:

#define UTS_RELEASE "2.6.22.2"
#define LINUX_VERSION_CODE 132630
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

Vmware finally believes that the version of the kernel header file provided by dorainm matches.

Currently, dorainm uses a self-compiled linux system. If it is a release version, there should be related methods to install the kernel header file, such as the redhat/fedora yum series, debian/ubuntu series apt and so on

If not, you can download the corresponding kernel from www.kernel.org. Then:

make mrproper
make oldconfig
make

To compile the kernel header file, and then follow the methods in this article to make vmware run happily :).


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.