Logo

dev-resources.site

for different kinds of informations.

How to Install VirtualBox on Kali OS(2022)

Published at
4/26/2022
Categories
penetrationtesting
kalilinux
development
virtualbox
Author
leomiscoding
Author
12 person written this
leomiscoding
open
How to Install VirtualBox on Kali OS(2022)

A few weeks back, in one of my learning, I was to install VirtualBox on my kali OS, but I wasn’t able to install it. I downloaded the VirtualBox installer twice and all gave the same error. I was stalked for a couple of days before I found a way around it and it worked for me.

I did the installation through the terminal, here are the steps.

Firstly, I did uname -a which check my system information, and what I was after in the information was the version of my kernel 5.16.18-1kali7amd64.

Then I did uname -r which showed me the release version of my kernel. I have the information I needed, now let’s go further.

We need to install the Linux kernel header because that is what is conflicting with installing the VirtualBox.

linux-headers is a package providing the Linux kernel headers. These are part of the kernel, although they are shipped separately.

The headers act as an interface between internal kernel components and also between userspace and the kernel. Packages like sys-libs/glibc depend on the kernel headers.

You have to have it if you need to compile kernel modules, and in Linux it is widely used as there are packages which comes as a source and then compiled and linked with the kernel when downloaded. This gives you the ability to link with multiple kernel versions as long as the kernel API hasn’t changed.

So, next is installing the Linux header using sudo apt install linux-headers-$(uname -r | sed ‘s,[^-]*-[^-]*-,,’). This should install the Linux header for your kernel version. While installing the header, you might encounter a failed to install error, kindly solve that by using this command sudo apt --fix-broken install. The error occurred because you have tried to install software and it failed, it still resides in the system memory and needs to be removed. After the error has been resolved, retry installing the Linux header.

After the header has been installed, then install the Linux Image of the header you just installed. Using sudo apt install linux-image-$(uname -r | sed ‘s,[^-]*-[^-]*-,,’).

Linux-image is the kernel binary. Linux headers is the source header files. There’s no reason to include them together, debian keeps dev packages and binary package seperate. In a simple term: linux-image contains the kernel image and the modules, while linux-headers contains the kernel headers.

After the above steps, what is next is to install the build-essential package

A meta-package is what build-essential is. It does not install anything on its own. It is instead a link to a number of other packages that will be installed as dependencies.
Essentially, the build-essential package provides you with everything you need to compile basic C and C++ software on Linux.
If you wanted to, you could install each of these packages separately. The build-essential meta-package, on the other hand, makes it straightforward to get everything you need in one package.
While build-essential is a solid starting point for compiling more difficult software on Linux, you may need to install extra libraries.

Install the build-essential package using sudo apt install build-essential dkms.

We are done installing all that is needed for us to install the VirtualBox on our Kali OS. Next is to now install the VirtualBox and its extension pack.

sudo apt install virtualbox virtualbox-ext-pack Will help you install it.

We are done, VirtualBox is now successfully installed on our machine.

Do you want to test it? Type virtualbox in your terminal, hit the enter button and watch VirtualBox load.

Enjoy your day.

virtualbox Article's
30 articles in total
Favicon
ELK Stack Mastery: Building a Scalable Log Management System
Favicon
Resizing the disk on a Vagrant virtual machine
Favicon
How to send/receive local emails in Linux Mint/VirtualBox
Favicon
VM cannot access internet via NAT VirtualBox
Favicon
在virtualbox中运行openwrt
Favicon
Install Ubuntu 20.04 on Virtualbox on Ubuntu 20.04
Favicon
Running Servers Through VirtualBox
Favicon
Clean Debian Storage
Favicon
(Quick-note) How to fix Virtualbox 7 screen turning black when on fullscreen (or above a specific screen size) on Windows 11
Favicon
Getting started with Vagrant: a beginner's Guide
Favicon
Oracle 19c Data Guard builds on Rhel8 /Oracle linux8/Centos8 (Vagrant)
Favicon
OpenBSD 7.3 on VirtualBox 7: Installation as guest OS failed due to I/O APIC enabled
Favicon
OpenBSD 7.3 on VirtualBox 7: ゲスト OS インストールに失敗 - 原因は I/O APIC 有効化
Favicon
How to Setup Ubuntu 20.04 LTS on your local windows machine using Vagrant
Favicon
[end Kernel panic - not syncing: Attemted to kill the idle task] VirtualBox
Favicon
How to install VirtualBox
Favicon
Compartilhando o Serial do Windows com a VM
Favicon
SO - TP 1
Favicon
OpenBSD フルディスク暗号化 (on VirtualBox)
Favicon
OpenBSD Full Disk Encryption (on VirtualBox)
Favicon
Virtualbox 7.0.4 kickstart issue
Favicon
Getting Started With Vulnhub
Favicon
SSH into your local VM as if it is a paid IaaS
Favicon
VirtualBox/VMware Alternatives for Linux
Favicon
Useful: VirtualBox helpers / Command
Favicon
Pardus 21 Sunucu Kurulumu Part 1 Sanal Makine oluşturma ve Makine ayarları
Favicon
How to solve E_INVALIDARG (0x80070057) in VirtualBox
Favicon
Bitrix Installation on Centos (Virtualbox & EC2)
Favicon
How to Install VirtualBox on Kali OS(2022)
Favicon
How to Install Genymotion & VirtualBox on Parrot OS

Featured ones: