Solution to VirtualBox installation error in centos

Source: Internet
Author: User
Tags centos


Core tips:

Check the file (SYmbolic LinK) header in the/lib/module/{kernel version number}/kernel/directory and whether the source is valid. They should be linked to your kernel Compilation directory.

In centos 6. x linux, the self-compiled kernel 3.0.32 is too old.

Virtualbox has not been updated for a long time, today updated, to the vbox official download installation package VirtualBox-4.2.12-84980-Linux_x86.run, sh run, but get the prompt:

The code is as follows: Copy code

[Root @ fsc download] # sh VirtualBox-4.2.12-84980-Linux_x86.run
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation ............
VirtualBox Version 4.2.12 r84980 (2013-04-12T10: 19: 13Z) installer
Please install the build and header files for your current Linux kernel.
The current kernel version is 3.0.32
Problems were found which wowould prevent VirtualBox from installing.
Please correct these problems and try again.

In my opinion, the header was installed during Kernel Compilation, otherwise the last installation was impossible.

Think about the cause: whether the kernel has errors in some places, such as some environment variables or things. I really don't want to re-compile the kernel. It seems that I have to download and compile the NIC driver. So consider looking for someone else compiled on the rpm Package, found a project called ELRepo, provide a series of kernel rpm package http://elrepo.org/linux/kernel/el6/i386/RPMS/ looks pretty good, can install their yum source.

I was about to download it. I suddenly thought that the machine was replaced by a solid state disk and copied it directly using the-p parameter. Many files in the home directory were stored on the mechanical hard disk, link to ~ through symbolic links ~ /Opdata: the kernel file is in it. The/lib/module/'uname-r'/directory contains two symbolic links, which are linked to the directory where the kernel is compiled. Whether to install the kernel-header does not actually copy the corresponding file to a directory, but it is just a symbolic link. Check it.

The code is as follows: Copy code
[Root @ fsc download] # cd/lib/modules/3.0.32/kernel/
[Root @ fsc kernel] # ls-alh ..

Total usage 3.8 M

The code is as follows: Copy code
Drwxr-xr-x. 4 root 4.0 K December 2 11:05.
Dr-xr-x. 16 root 4.0 K June 2 10:47 ..
Lrwxrwxrwx. 1 root 39 May 26 build->/home/feng/software/kernel/linux-3.0.32
Drwxr-xr-x. 12 root 4.0 K 2012 kernel
......
-Rw-r --. 1 root 964 K December 2 11:05 modules. usbmap
Lrwxrwxrwx. 1 root 39 June 24 2012 source->/home/feng/software/kernel/linux-3.0.32

Sure enough, the build and source link files are still linked to the original location, and the shell prompts "dead link" in the red background ".

Delete these two linked files and recreate valid links.

The code is as follows: Copy code

Rm build source
Ln-s/home/feng/optdata/software/kernel/linux-3.0.32/build
Ln-s/home/feng/optdata/software/kernel/linux-3.0.32/source

Run the sh VirtualBox-4.2.12-84980-Linux_x86.run again and virtualbox is successfully installed.

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.