PDA

View Full Version : installing VitualBox in kali linux host



0pacity
2013-03-31, 21:51
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:


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:


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:


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:


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:


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.

--alexander--
2013-07-17, 22:30
thank you bro sooooo much i was figting with this error for 5 days it dot me mad , i love u
thank you thank you thank you

carmila
2013-07-20, 11:15
im having the same problem before.. thanks so much for providing the solution. :)

dhuz
2013-07-31, 13:54
thanks, working now!!!!

Amidamaru
2013-08-07, 16:20
Hi,

As an alternative I've followed these steps and for me they work flawless :

https://www.virtualbox.org/wiki/Linux_Downloads

DKMS is automatically installed so no worries about that as well. ;)

halo
2014-03-28, 13:33
Thank you soooo much!

californiajunkie
2014-04-28, 20:08
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:


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:


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:


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:


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:


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.


Hey thanks so much for this it helped me a lot. I was able to install virtualbox thanks to your post. I was having the kernel module fail and after i installed dkms it went perfectly so thanks. My only question is all of my code returned the exact same as yours except i didnt get the last line "Processing triggers for python-central" will this effect anything with my instalation?

OS-13115
2014-05-22, 03:10
Great tutorial/explaination. One caveate, my Gnome isn't doing its thing.




root@kali:~# dpkg -i virtualbox-4.3_4.3.12-93733~Debian~wheezy_amd64.deb
dpkg: error processing virtualbox-4.3_4.3.12-93733~Debian~wheezy_amd64.deb (--install):
cannot access archive: No such file or directory
Errors were encountered while processing:
virtualbox-4.3_4.3.12-93733~Debian~wheezy_amd64.deb
root@kali:~#

yasirkid
2014-06-30, 05:50
thanQ for this post it helped a lot

dupek
2014-08-04, 14:55
I got the VB working and installed winxp in it. The problem That I have is file transfer. How do I transfer file to and from Kali to winxp in VB?. Usb do not work in VB. I did installed the guest addition, but still no luck. Any help here. Thanks.

zimmaro
2014-08-05, 15:41
I got the VB working and installed winxp in it. The problem That I have is file transfer. How do I transfer file to and from Kali to winxp in VB?. Usb do not work in VB. I did installed the guest addition, but still no luck. Any help here. Thanks.
hi :-)
i think one GOOD solution after install guest-additions ..is..ENABLE SHARED-FOLDER
http://www.imagestime.com/show.php/965861_Schermatadel20140805173100.png.html

kaboyish
2014-10-07, 09:40
THANKS!!!
Worked like a charm