greetings all. If another post already addresses this issue i apologize.
The subject of this post is the installation of VirtualBox virtualization software in a kali linux host, NOT installing a kali linux VirtualBox or VMware guest VM in a host host OS.
I successfully installed VirtualBox in a kali 64-bit host OS. The steps taken and problems accountered are as follows:
1) downloaded the virtualbox-4.2_4.2.10-84104~Debian~wheezy_amd64.deb file from virtualbox.org
2) attempted to unpackage/depackage the software:
Code:
root@kali:~# dpkg -i virtualbox-4.2_4.2.10-84104~Debian~wheezy_amd64.deb
Selecting previously unselected package virtualbox-4.2.
(Reading database ... 230509 files and directories currently installed.)
Unpacking virtualbox-4.2 (from virtualbox-4.2_4.2.10-84104~Debian~wheezy_amd64.deb) ...
dpkg: dependency problems prevent configuration of virtualbox-4.2:
virtualbox-4.2 depends on libqt4-opengl (>= 4:4.7.2); however:
Package libqt4-opengl is not installed.
dpkg: error processing virtualbox-4.2 (--install):
dependency problems - leaving unconfigured
Processing triggers for shared-mime-info ...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for hicolor-icon-theme ...
Errors were encountered while processing:
virtualbox-4.2
The problem here is a missing package ("Package libqt4-opengl is not installed.")
3) installed the missing package:
Code:
root@kali:~# apt-get install libqt4-opengl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
libqt4-opengl
0 upgraded, 1 newly installed, 0 to remove and 44 not upgraded.
1 not fully installed or removed.
Need to get 337 kB of archives.
After this operation, 1,250 kB of additional disk space will be used.
Get:1 http://http.kali.org/kali/ kali/main libqt4-opengl amd64 4:4.8.2+dfsg-11 [337 kB]
Fetched 337 kB in 5s (61.3 kB/s)
Selecting previously unselected package libqt4-opengl:amd64.
(Reading database ... 231244 files and directories currently installed.)
Unpacking libqt4-opengl:amd64 (from .../libqt4-opengl_4%3a4.8.2+dfsg-11_amd64.deb) ...
Setting up libqt4-opengl:amd64 (4:4.8.2+dfsg-11) ...
Setting up virtualbox-4.2 (4.2.10-84104~Debian~wheezy) ...
Adding group `vboxusers' (GID 132) ...
Done.
update-rc.d: We have no instructions for the vboxdrv init script.
update-rc.d: It looks like a non-network service, we enable it.
[ ok ] Stopping VirtualBox kernel modules:.
[....] Recompiling VirtualBox kernel modules:
[FAIL] Look at /var/log/vbox-install.log to find out what went wrong ... failed!
update-rc.d: We have no instructions for the vboxballoonctrl-service init script.
update-rc.d: It looks like a non-network service, we enable it.
update-rc.d: We have no instructions for the vboxautostart-service init script.
update-rc.d: It looks like a non-network service, we enable it.
update-rc.d: We have no instructions for the vboxweb-service init script.
update-rc.d: It looks like a non-network service, we enable it.
Processing triggers for python-central ...
4) now that the missing has been installed, re-attempt to unpackage/depackage:
Code:
root@kali:~# dpkg -i virtualbox-4.2_4.2.10-84104~Debian~wheezy_amd64.deb
(Reading database ... 231254 files and directories currently installed.)
Preparing to replace virtualbox-4.2 4.2.10-84104~Debian~wheezy (using virtualbox-4.2_4.2.10-84104~Debian~wheezy_amd64.deb) ...
[ ok ] Stopping VirtualBox kernel modules:.
Unpacking replacement virtualbox-4.2 ...
Setting up virtualbox-4.2 (4.2.10-84104~Debian~wheezy) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
[ ok ] Stopping VirtualBox kernel modules:.
[....] 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 ...
Process fails again.
Text in /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."
5) enter text "recompiling virtualbox kernel modules" (no qotation marks in query, included here to delineate search text) in google.com search bar
6) click on second result from top, link to this page:
http://www.virtualbox.org/manual/ch02.html#idp13109536
section of interest: The VirtualBox kernel module
7) install DKMS software:
Code:
root@kali:~# apt-get install dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
linux-headers-3.7-trunk-amd64 linux-headers-3.7-trunk-common linux-headers-amd64 linux-kbuild-3.7
The following NEW packages will be installed:
dkms linux-headers-3.7-trunk-amd64 linux-headers-3.7-trunk-common linux-headers-amd64 linux-kbuild-3.7
0 upgraded, 5 newly installed, 0 to remove and 44 not upgraded.
Need to get 4,748 kB of archives.
After this operation, 30.2 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 dkms all 2.2.0.3-1.2 [77.4 kB]
Get:2 http://http.kali.org/kali/ kali/main linux-headers-3.7-trunk-common amd64 3.7.2-0+kali6 [3,842 kB]
Get:3 http://http.kali.org/kali/ kali/main linux-kbuild-3.7 amd64 3.7.1-1~experimental.1+kali2 [247 kB]
Get:4 http://http.kali.org/kali/ kali/main linux-headers-3.7-trunk-amd64 amd64 3.7.2-0+kali6 [576 kB]
Get:5 http://http.kali.org/kali/ kali/main linux-headers-amd64 amd64 3.7+46+kali1 [4,522 B]
Fetched 4,748 kB in 1min 16s (62.2 kB/s)
Selecting previously unselected package dkms.
(Reading database ... 231254 files and directories currently installed.)
Unpacking dkms (from .../dkms_2.2.0.3-1.2_all.deb) ...
Selecting previously unselected package linux-headers-3.7-trunk-common.
Unpacking linux-headers-3.7-trunk-common (from .../linux-headers-3.7-trunk-common_3.7.2-0+kali6_amd64.deb) ...
Selecting previously unselected package linux-kbuild-3.7.
Unpacking linux-kbuild-3.7 (from .../linux-kbuild-3.7_3.7.1-1~experimental.1+kali2_amd64.deb) ...
Selecting previously unselected package linux-headers-3.7-trunk-amd64.
Unpacking linux-headers-3.7-trunk-amd64 (from .../linux-headers-3.7-trunk-amd64_3.7.2-0+kali6_amd64.deb) ...
Selecting previously unselected package linux-headers-amd64.
Unpacking linux-headers-amd64 (from .../linux-headers-amd64_3.7+46+kali1_amd64.deb) ...
Processing triggers for man-db ...
Setting up dkms (2.2.0.3-1.2) ...
Setting up linux-headers-3.7-trunk-common (3.7.2-0+kali6) ...
Setting up linux-kbuild-3.7 (3.7.1-1~experimental.1+kali2) ...
Setting up linux-headers-3.7-trunk-amd64 (3.7.2-0+kali6) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.7-trunk-amd64
Setting up linux-headers-amd64 (3.7+46+kali1) ...
installation of DKMS successful.
8) attempt 3 of "virtualbox-4.2_4.2.10-84104~Debian~wheezy_amd64.deb" depackage:
Code:
root@kali:~# dpkg -i virtualbox-4.2_4.2.10-84104~Debian~wheezy_amd64.deb
(Reading database ... 241135 files and directories currently installed.)
Preparing to replace virtualbox-4.2 4.2.10-84104~Debian~wheezy (using virtualbox-4.2_4.2.10-84104~Debian~wheezy_amd64.deb) ...
[ ok ] Stopping VirtualBox kernel modules:.
Unpacking replacement virtualbox-4.2 ...
Setting up virtualbox-4.2 (4.2.10-84104~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:.
[ ok ] Trying to register the VirtualBox kernel modules using DKMS:.
[ ok ] Starting VirtualBox kernel modules:.
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 ...
No errors reported, installation successful.
The VirtualBox menu icon is now at Applications >> System Tools >> Oracle VM VirtualBox, underneath the Ophcrack menu icon
It is my hope that this assists users to install VirtualBox in their kali linux host. Again, if a post on this process already exists, i apologize.