I wants to install VirtualBox so I downloaded rpm file from VirtualBox web-site and installed by rpm command.
It's the error:
Code: Select all
[vahid@localhost Downloads]$ sudo service vboxdrv setup
Stopping VirtualBox kernel modules [ OK ]
Uninstalling old VirtualBox DKMS kernel modules [ OK ]
Trying to register the VirtualBox kernel modules using DKMSError! echo
Your kernel headers for kernel 3.10.0-123.el7.x86_64 cannot be found at
/lib/modules/3.10.0-123.el7.x86_64/build or /lib/modules/3.10.0-123.el7.x86_64/source.
[FAILED]
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules [FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)
Code: Select all
[vahid@localhost Downloads]$ tail /var/log/vbox-install.log
------------------------------
Done.
Attempting to install using DKMS
Creating symlink /var/lib/dkms/vboxhost/4.3.20/source ->
/usr/src/vboxhost-4.3.20
DKMS: add completed.
Failed to install using DKMS, attempting to install without
Makefile:183: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.
I set the KERN_DIR with /usr/src/kernels/3.10.0-123.13.2.el7.x86_64 and export KERN_DIRbinutils qt gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms
but still same error.