Loading Dkms,kernel-devel,makecache:
Yum install Dkmsyum install kernel-develyum makecache
Download VirtualBox https://www.virtualbox.org/wiki/Linux_Downloads and install:
Yum localinstall virtualbox-4.3-4.3. 8_92456_fedora18-1. x86_64.rpm-y
Installation is complete, creating the virtual machine and encountering an error when it starts:
is is a permission problem with/dev/vboxdrv. Reinstall the kernel module by executing'/etc/init.d/vboxdrv setup' as is inch if necessary.
then compile VirtualBox kernel:
[[email protected] zhanghua]#/etc/init.d/vboxdrv Setup
Stopping VirtualBox kernel modules [OK]
Uninstalling old VirtualBox DKMS kernel modules [OK]
Trying to register the VirtualBox kernel modules using dkms[OK]
Starting VirtualBox kernel modules [OK]
If the following error occurs, the kernel corresponding kernel headers or kernel version inconsistency is not found :
stopping VirtualBox kernel modules [OK] uninstalling old VirtualBox DKMS kernel modules [OK] Trying to register the VirtualBox kernel modulesusingdkmserror!echo Your Kernel headers forKernel3.18.7- $. fc21.x86_64 cannot be found at/lib/modules/3.18.7- $. Fc21.x86_64/build or/lib/modules/3.18.7- $. fc21.x86_64/source. [FAILED] (Failed, trying without DKMS) recompiling VirtualBox kernel modules [FAILED] ( look at/var/log/vbox-install.log to find outWhat went wrong)
To view the kernel version:
[Email protected] zhanghua]# uname-r
3.18.7-200.fc21.x86_64
To view the installed kernel version:
[Email protected] zhanghua]# RPM-QA|GREP headers
Kernel-headers-3.17.8-200.fc21.x86_64
Glibc-headers-2.20-7.fc21.x86_64
Inconsistent version found, installation kernel-headers-3.18.7-200.fc21.x86_64
Yum Install kernel-headers-3.18.7-200.fc21.x86_64
The versions are identical after rebooting:
[Email protected] zhanghua]# uname-R3.18. 7-fc21.x86_64[[email protected]-zhanghua zhanghua]# rpm-qa| grep headerskernel-headers-3.18. 7-fc21.x86_64glibc-headers-2.20-7. fc21.x86_64
Compile again, the result is normal ( compile the VirtualBox kernel, if it fails , you may need to install dkms again ):
[Email protected] zhanghua]#/etc/init.d/vboxdrv setup stopping VirtualBox kernel modules [OK] Uninstalling old VirtualBox DKMS kernel modules [OK] using dkms[OK] starting VirtualBox Kern El modules [OK]
FEDORA21 installation VirtualBox