Kali Linux - unable to install kernel headers (cannot install virtualbox) - leszkens0990 - Jan 21, 2015
Hello HF
I tried to install virtualbox on Kali linux 32bit (Kernel Linux 3.7-trunk-686-pae). While installation through apt-get install virtualbox i'm getting this problems
Code [spoiler]Selecting previously unselected package linux-headers-3.14-kali1-686-pae.
Unpacking linux-headers-3.14-kali1-686-pae (from .../linux-headers-3.14-kali1-686-pae_3.14.5-1kali2_i386.deb) ...
Selecting previously unselected package linux-headers-686-pae.
Unpacking linux-headers-686-pae (from .../linux-headers-686-pae_3.14+57+kali1_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for menu ...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for shared-mime-info ...
Setting up libgsoap4:i386 (2.8.16-2~bpo70+1) ...
Setting up libvncserver0:i386 (0.9.9+dfsg-1+deb7u1) ...
Setting up virtualbox (4.3.10-dfsg-1~bpo70+1) ...
[ ok ] Stopping VirtualBox kernel modules.
[....] Starting VirtualBox kernel modules[....] No suitable module for running k[FAIL found ... failed!
failed!
invoke-rc.d: initscript virtualbox, action "restart" failed.
Setting up dkms (2.2.0.3-1.2) ...
Setting up virtualbox-dkms (4.3.10-dfsg-1~bpo70+1) ...
Loading new virtualbox-4.3.10 DKMS files...
First Installation: checking all kernels...
Building only for 3.7-trunk-686-pae
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
[ ok ] Stopping VirtualBox kernel modules.
[....] Starting VirtualBox kernel modules[....] No suitable module for running k[FAIL found ... failed!
failed!
invoke-rc.d: initscript virtualbox, action "restart" failed.
Setting up virtualbox-qt (4.3.10-dfsg-1~bpo70+1) ...
Setting up linux-headers-3.14-kali1-common (3.14.5-1kali2) ...
Setting up linux-kbuild-3.14 (3.14-1kali1) ...
Setting up linux-headers-3.14-kali1-686-pae (3.14.5-1kali2) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.14-kali1-686-pae
Setting up linux-headers-686-pae (3.14+57+kali1) ...
[/spoiler]
command install linux-headers-$(uname -r) doesn't help becouse i get error like this
Code [color=#FF0000]root@kali[/color]:~# apt-get install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-3.7-trunk-686-pae
E: Couldn't find any package by regex 'linux-headers-3.7-trunk-686-pae'
And when i try to run virtualbox:
Code [color=#FF0000]root@kali[/color]:~# virtualbox
WARNING: The character device /dev/vboxdrv does not exist.
Please install the virtualbox-dkms package and the appropriate
headers, most likely linux-headers-686.
You will not be able to start VMs until this problem is fixed.
![[Image: OVo8AYV.jpg]](https://i.imgur.com/OVo8AYV.jpg)
I googled this problem several times. The most common advice was to intall kernel headers through 'apt-get install linux-headers-$(uname -r)' but it doesn't work. I tried everything buy nothing works.
If you need more information, post in this thread.
Thanks in advice.
* - Betty Blue - Jan 21, 2015
Saying you have tried everything doesn't really accurately say what you have tried.
Have you tried
PHP Code
<?php sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
* - leszkens0990 - Jan 21, 2015
(Jan 21, 2015 01:00 PM)./Dot Slash Wrote: PHP Code
<?php sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
i tried this few times but, sure i try it again but i don't think it solve my problem
* - 69669 - Jan 21, 2015
PHP Code
<?php sudo dpkg-reconfigure virtualbox-dkms sudo dpkg-reconfigure virtualbox sudo modprobe vboxdrv
#Fix eth0 sudo modprobe vboxnetflt
That should be what you need...
* - Betty Blue - Jan 21, 2015
(Jan 21, 2015 02:29 PM)69669 Wrote: PHP Code
<?php sudo dpkg-reconfigure virtualbox-dkms sudo dpkg-reconfigure virtualbox sudo modprobe vboxdrv
#Fix eth0 sudo modprobe vboxnetflt
That should be what you need... Ah, yeah, I completely looked over the image when replying.
* - leszkens0990 - Jan 22, 2015
(Jan 21, 2015 02:29 PM)69669 Wrote: PHP Code
<?php sudo dpkg-reconfigure virtualbox-dkms sudo dpkg-reconfigure virtualbox sudo modprobe vboxdrv
#Fix eth0 sudo modprobe vboxnetflt
That should be what you need...
Code [color=#FF0000]root@kali[/color]:~# sudo dpkg-reconfigure virtualbox-dkms
------ Uninstall Beginning ------
Module: virtualbox
Version: 4.3.10
Kernel: 3.14-kali1-686-pae (i686)
------
Status: Before uninstall, this module version was ACTIVE on this kernel.
vboxdrv.ko:
- Uninstallation
- Deleting from: /lib/modules/3.14-kali1-686-pae/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetadp.ko:
- Uninstallation
- Deleting from: /lib/modules/3.14-kali1-686-pae/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetflt.ko:
- Uninstallation
- Deleting from: /lib/modules/3.14-kali1-686-pae/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxpci.ko:
- Uninstallation
- Deleting from: /lib/modules/3.14-kali1-686-pae/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod....
------
Deleting module version: 4.3.10
completely from the DKMS tree.
------
Done.
Loading new virtualbox-4.3.10 DKMS files...
Building only for 3.7-trunk-686-pae
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
[ ok ] Stopping VirtualBox kernel modules.
[....] Starting VirtualBox kernel modules[....] No suitable module for running k[FAIL found ... failed!
failed!
invoke-rc.d: initscript virtualbox, action "restart" failed.
[color=#FF0000]root@kali[/color]:~# sudo dpkg-reconfigure virtualbox
[ ok ] Stopping VirtualBox kernel modules.
[....] Starting VirtualBox kernel modules[....] No suitable module for running k[FAIL found ... failed!
failed!
invoke-rc.d: initscript virtualbox, action "restart" failed.
[color=#FF4500]root@kali[/color]:~# sudo modprobe vboxdrv
FATAL: Module vboxdrv not found.
[color=#FF0000]root@kali[/color]:~# #Fix eth0
[color=#FF0000]root@kali[/color]:~# sudo modprobe vboxnetflt
FATAL: Module vboxnetflt not found.
[color=#FF0000]root@kali[/color]:~#
* - 69669 - Jan 22, 2015
reinstall VirtualBox...
The problem is that the module required isn't being loaded. Reinstall VirtualBox and run this command:
sudo modprobe vboxdrv
sudo modprobe vboxnetflt
It should be enough as long as the commands work properly.
* - leszkens0990 - Jan 22, 2015
(Jan 22, 2015 01:57 PM)69669 Wrote: reinstall VirtualBox...
The problem is that the module required isn't being loaded. Reinstall VirtualBox and run this command:
sudo modprobe vboxdrv
sudo modprobe vboxnetflt
It should be enough as long as the commands work properly. it doesn't work
i tried to reinstall virtualbox-dkms and this is what i got
root@kali:~# apt-get remove virtualbox-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
virtualbox-dkms
0 upgraded, 0 newly installed, 1 to remove and 497 not upgraded.
After this operation, 4,161 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 283306 files and directories currently installed.)
Removing virtualbox-dkms ...
------
Deleting module version: 4.3.10
completely from the DKMS tree.
------
Done.
root@kali:~# apt-get install virtualbox-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
virtualbox-dkms
0 upgraded, 1 newly installed, 0 to remove and 497 not upgraded.
Need to get 0 B/557 kB of archives.
After this operation, 4,161 kB of additional disk space will be used.
Selecting previously unselected package virtualbox-dkms.
(Reading database ... 283034 files and directories currently installed.)
Unpacking virtualbox-dkms (from .../virtualbox-dkms_4.3.10-dfsg-1~bpo70+1_all.deb) ...
Setting up virtualbox-dkms (4.3.10-dfsg-1~bpo70+1) ...
Loading new virtualbox-4.3.10 DKMS files...
First Installation: checking all kernels...
Building only for 3.7-trunk-686-pae
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
[ ok ] Stopping VirtualBox kernel modules.
[....] Starting VirtualBox kernel modules[....] No suitable module for running k[FAIL found ... failed![/color]
failed!
invoke-rc.d: initscript virtualbox, action "restart" failed.
this is very hard problem to solve
* - 69669 - Jan 22, 2015
sudo apt-cache search linux-headers
(could be linux-headers-686)
Find the appropriate one and install it, then do
dpkg-reconfigure virtualbox-dkms
* - leszkens0990 - Jan 23, 2015
(Jan 22, 2015 04:40 PM)69669 Wrote: sudo apt-cache search linux-headers
(could be linux-headers-686)
Find the appropriate one and install it, then do
dpkg-reconfigure virtualbox-dkms
root@kali:~# apt-get install virtualbox
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
dkms libgsoap4 libvncserver0 virtualbox-dkms virtualbox-qt
Suggested packages:
libvncserver0-dbg virtualbox-guest-additions-iso vde2
The following NEW packages will be installed:
dkms libgsoap4 libvncserver0 virtualbox virtualbox-dkms virtualbox-qt
0 upgraded, 6 newly installed, 0 to remove and 510 not upgraded.
Need to get 21.8 MB of archives.
After this operation, 88.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://http.kali.org/kali/ kali/main libgsoap4 i386 2.8.16-2~bpo70+1 [550 kB]
Get:2 http://http.kali.org/kali/ kali/main libvncserver0 i386 0.9.9+dfsg-1+deb7u1 [277 kB]
Get:3 http://http.kali.org/kali/ kali/contrib virtualbox i386 4.3.10-dfsg-1~bpo70+1 [15.7 MB]
Get:4 http://http.kali.org/kali/ kali/main dkms all 2.2.0.3-1.2 [77.4 kB]
Get:5 http://http.kali.org/kali/ kali/contrib virtualbox-dkms all 4.3.10-dfsg-1~bpo70+1 [557 kB]
Get:6 http://http.kali.org/kali/ kali/contrib virtualbox-qt i386 4.3.10-dfsg-1~bpo70+1 [4,587 kB]
Fetched 21.8 MB in 2min 39s (136 kB/s)
Selecting previously unselected package libgsoap4:i386.
(Reading database ... 282663 files and directories currently installed.)
Unpacking libgsoap4:i386 (from .../libgsoap4_2.8.16-2~bpo70+1_i386.deb) ...
Selecting previously unselected package libvncserver0:i386.
Unpacking libvncserver0:i386 (from .../libvncserver0_0.9.9+dfsg-1+deb7u1_i386.deb) ...
Selecting previously unselected package virtualbox.
Unpacking virtualbox (from .../virtualbox_4.3.10-dfsg-1~bpo70+1_i386.deb) ...
Selecting previously unselected package dkms.
Unpacking dkms (from .../dkms_2.2.0.3-1.2_all.deb) ...
Selecting previously unselected package virtualbox-dkms.
Unpacking virtualbox-dkms (from .../virtualbox-dkms_4.3.10-dfsg-1~bpo70+1_all.deb) ...
Selecting previously unselected package virtualbox-qt.
Unpacking virtualbox-qt (from .../virtualbox-qt_4.3.10-dfsg-1~bpo70+1_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for menu ...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for shared-mime-info ...
Setting up libgsoap4:i386 (2.8.16-2~bpo70+1) ...
Setting up libvncserver0:i386 (0.9.9+dfsg-1+deb7u1) ...
Setting up virtualbox (4.3.10-dfsg-1~bpo70+1) ...
[ ok ] Stopping VirtualBox kernel modules.
[....] Starting VirtualBox kernel modules[....] No suitable module for running k[FAIL found ... failed!
failed!
invoke-rc.d: initscript virtualbox, action "restart" failed.
Setting up dkms (2.2.0.3-1.2) ...
Setting up virtualbox-dkms (4.3.10-dfsg-1~bpo70+1) ...
Loading new virtualbox-4.3.10 DKMS files...
First Installation: checking all kernels...
Building only for 3.7-trunk-686-pae
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
[ ok ] Stopping VirtualBox kernel modules.
[....] Starting VirtualBox kernel modules[....] No suitable module for running k[FAIL found ... failed!
failed!
invoke-rc.d: initscript virtualbox, action "restart" failed.
Setting up virtualbox-qt (4.3.10-dfsg-1~bpo70+1) ...
Processing triggers for menu ...
root@kali:~# dpkg-reconfigure
/usr/sbin/dpkg-reconfigure: please specify a package to reconfigure
root@kali:~# dpkg-reconfigure virtualbox-dkms
------
Deleting module version: 4.3.10
completely from the DKMS tree.
------
Done.
Loading new virtualbox-4.3.10 DKMS files...
Building only for 3.7-trunk-686-pae
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
[ ok ] Stopping VirtualBox kernel modules.
[....] Starting VirtualBox kernel modules[....] No suitable module for running k[FAIL found ... failed!
failed!
invoke-rc.d: initscript virtualbox, action "restart" failed.
root@kali:~#
i updated sources.list before. also i added some extra lines in /etc/apt/sources.list from debian wheezy orginal sources.list (becouse kali is debian based), and still doesn't work.
i remember that some few months ago i was able to run virtual box after running command 'etc/init.d/vboxdrv setup' as poped out in windows (picture related in my first post in this thread) but now i'm not able to run vbox anymore.
I tried to install vbox .deb package through dpkg. this is what i got
root@kali:~# apt-get install dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
dkms is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 497 not upgraded.
root@kali:~# dpkg -i virtualbox-4.2_4.2.14-86644~Debian~wheezy_i386.deb
Selecting previously unselected package virtualbox-4.2.
(Reading database ... 282804 files and directories currently installed.)
Unpacking virtualbox-4.2 (from virtualbox-4.2_4.2.14-86644~Debian~wheezy_i386.deb) ...
Setting up virtualbox-4.2 (4.2.14-86644~Debian~wheezy) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
[ ok ] Stopping VirtualBox kernel modules:.
[ ok ] Uninstalling old VirtualBox DKMS kernel modules:.
[....] Trying to register the VirtualBox kernel modules using DKMS:Error! Your kernel headers for kernel 3.7-trunk-686-pae cannot be found.
Please install the linux-headers-3.7-trunk-686-pae package,
or use the --kernelsourcedir option to tell DKMS where it's located
[FAIL] Failed, trying without DKMS ... failed!
[....] Recompiling VirtualBox kernel modules:
[FAIL] Look at /var/log/vbox-install.log to find out what went wrong ... failed!
Processing triggers for shared-mime-info ...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for python-central ...
root@kali:~# leafpad /var/log/vbox-install.log
Makefile:181: * Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.
please somebody help me. I really need vbox
* - leszkens0990 - Jul 28, 2015
I know how to fix it after year of searching.
maybe it will be usefull for somebody.
It is copy-paste from bezpieka.org though
if somebody need help pm me. i cannot post it here becouse hf blocks me when i want po post etc/apt/sources.list <lol>
* - #Skyline - Jul 29, 2015
(Jul 28, 2015 05:21 AM)leszkens0990 Wrote: I know how to fix it after year of searching.
maybe it will be usefull for somebody.
It is copy-paste from bezpieka.org though
if somebody need help pm me. i cannot post it here becouse hf blocks me when i want po post etc/apt/sources.list <lol>
Glad you could resolve this, I was just about to post that answer.
|