LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Virtualbox-How to install the build and header files for my current Linux kernel? (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/virtualbox-how-to-install-the-build-and-header-files-for-my-current-linux-kernel-4175469470/)

gabytf 07-13-2013 02:47 AM

Virtualbox-How to install the build and header files for my current Linux kernel?
 
I am with Slackware64 14.0.
My Virtualbox was run perfectly only until i upgrade my kernel version from 3.2.29 to 3.2.45.

I upgrade my kernel version by using command "pkgtool","install package from current directory"...one by one i install the kernel-firmware, kernel-huge and kernel-modules files.

I reverted back to Kernel 3.2.29, but same message still came out:

Quote:

bash-4.2# ./VirtualBox-4.2.16-86992-Linux_amd64.run
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation............
VirtualBox Version 4.2.16 r86992 (2013-07-04T14:33:09Z) installer
Please install the build and header files for your current Linux kernel.
The current kernel version is 3.2.29
Problems were found which would prevent VirtualBox from installing.
Please correct these problems and try again.
bash-4.2#
Thank you very much.

Ser Olmy 07-13-2013 02:54 AM

Slackware uses a stock Linux kernel with no patches. You can either install the relevant source and headers packages, or simply download the kernel source from http://www.kernel.org.

Make sure there's a /usr/src/linux symlink pointing to the kernel source directory. If the link is missing or pointing to the wrong kernel version, other software may not be able to find the kernel source code.

gabytf 07-13-2013 03:05 AM

Thank you. i don't really know how to do recompile from source. The upgrade kernel is from here, the "patch" directory, is this what you mean the patches?

http://slackware.org.uk/slackware/sl.../linux-3.2.45/

Ser Olmy 07-13-2013 08:32 AM

Some Linux distributions use slightly modified kernels, so you have to download the source from one of that distribution's repositories to get a properly patched kernel. Not so with Slackware.

When you install or download the kernel source code for any given kernel version, you generally get a directory under /usr/src with the name of that kernel, for instance /usr/src/linux-3.2.45. There are normally two symbolic links pointing to that directory:
  1. a link called /lib/modules/<version>/build, created when the kernel modules are installed
  2. a link called /usr/src/linux, which one may have to create manually
Other software needing to access the kernel source code, like VirtualBox, will typically use one of those links to locate it. Make sure they exist and point to the right directory.

gabytf 07-13-2013 03:26 PM

Thank you once again. i know what is the problem now.

Obviously I don't have the source code installed when i upgraded any one of the kernel.i was only installed the kernel-firmware, kernel-huge and kernel-modules files, but without the kernel-source code. When i access the /usr/src/linux-3.2.29, it was empty, and no link of /usr/src/linux.

I now revert to kernel-3.2.45 with the source code installed. Everything was fine and finished the virtualbox installation and run well again.


All times are GMT -5. The time now is 03:27 PM.