The header file "What is the location of the directory of C header files" is missing in the vmware-tool Installation

Source: Internet
Author: User

I am using the following methods to install Tools in CentOS. The last part is the solution that I have installed the kernel source code and cannot connect to the Internet.

Http://blog.163.com/jlz_325/blog/static/191740009201171901415511/:

In addition: http://blog.chinaunix.net/uid-25811099-id-324496.html this lecture "vmwarw.ls installation and use" is also a very good work

The following error occurs during the installation of VM-warrentls in RHEL5:

What is the location of the directory of C header files that match your running kernel? [/Usr/src/linux/include] The directory of kernel headers (version 2.6.18-8. el5xen) does not match

This error mainly occurs when the Linux kernel header file cannot be found. To solve this problem, you need to install the kernel source code.

 

 

Perform the following installation first; otherwise, an error occurs during the installation:

What is the location of the directory of C header files that match your running kernel? [/Usr/src/linux/include] The directory of kernel headers (version 2.6.18-8. el5xen) does not match.

 

I found a lot of related content online, some people said that the RPM package to be installed is kernel-devel, after testing, after installing the kernel-devel-2.6.18-8.el5.i686.rpm package still cannot automatically find the directory of C header files, if you manually change the directory to:/usr/src/kernels/2.6.18-8. e15-i686/include with errors:

The Directory of kernel headers (version 2.6.18-8. EL5) does not match your running kernel (version 2.6.18-8. el5xen ). even if the module were tocompile successfully, it wocould not load into the running kernel.

 

Solution:

[Root @ localhost ~] # Uname-r // view the kernel version

Version 2.6.18-8. el5xen // the Linux kernel version I have installed

I installed the system with a CD image and found the kernel-xen-devel-2.6.18-8.el5.i686.rpm package under the first disk server for installation.

[Root @ localhost ~] # Rpm-IVH kernel-xen-devel-2.6.18-8.el5.i686.rpm

 

Install vmwar tools

Choose VM --> install VMware Tools

[Root @ localhost ~] # Mkdir/mnt/CDROM

[Root @ localhost ~] # Mount/dev/CDROM/mnt/CDROM/

[Root @ localhost ~] # Cd/mnt/CDROM/

[Root @ localhost CDROM] # After ls

VMwareTools-6.5.0-118166.i386.rpm

VMwareTools-6.5.0-118166.tar.gz

 

Select the source code to install

[Root @ localhost CDROM] # cp VMwareTools-6.5.0-118166.tar.gz/tmp // copy to/tmp

[Root @ localhost CDROM] # cd/tmp/

[Root @ localhost TMP] # tar zxvf VMwareTools-6.5.0-118166.tar.gz // unpack the file

[Root @ localhost TMP] # cd vmware-tools-distrib/

[Root @ localhost vmware-tools-distrib] #./vmware-install.pl // start Installation

 

Press enter all the way, OK!

Go to/etc/X11/and check that Xorg. conf is automatically configured.

Reboot OK!

 

Bytes -----------------------------------------------------------------------------------

1. Check the kernel version number first:

[Root @ localhost ~] # Uname-r // view the kernel version or uname-

For rhel5, the kernel should be 2.6.18-8. el5xen.

2. You already know that your kernel is 2.6.18-8. el5xen. You can go to this website

Http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.16.8.tar.gz download to the kernel source code that fits your system.

3. Use [root @ localhost ~] # Tar zxvf linux-2.6.16.8.tar.gz-C/usr/src

Decompress the file to the specified directory/usr/src.

4. Go to the/usr/src directory and use [root @ localhost ~] # Mv linux-2.6.18.8 Linux will unzip the folder name "linux-2.6.18.8" changed to "Linux ".

5. Go to the/usr/src/Linux directory. Run:

Make mrproper

Make oldconfig

Make

When you run the second command, the system prompts you to press Enter. If the third command is to be fully executed, it may take several hours. It is best to install the Virtual Machine Tool after compilation. If version. h and utsrelease. h are generated at the beginning of make execution, press Ctrl + C to forcibly exit the compilation. After installing the VM-ware tools, the system may fail to start properly.

6. After compilation, enter/usr/src/Linux/include/Linux and use [root @ localhost ~] # Vi utsrelease. H (insert by I, Press ESC after modification, and then press SHIFT +:, enter WQ! Press enter. After modification, use # More utsrelease. h to check whether the modification is successful.) change the version number to 2.6.18-8. el5xen.

Modify version. h as above, add a line # define UTS_RELEASE "2.6.18-8. el5xen" based on the original one, save and exit.

7. restart the system. If you do not restart the system, you may encounter some problems after installing VM-ware Tools.

8. After restart, you can install VM-ware Tools normally.

9. If you want to change the resolution, run/usr/bin/vmware-config-tools.pl to modify

According to the above practice, my VM cannot access the Internet normally (previously used NAT ). That's because after the kernel source code is installed, the network settings become dhcp. Please press my

Http://blog.csdn.net/design321/article/details/8561896

I hope you will succeed!

Related Article

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.