Chances are you already know what VirtualBox is. If not, it is a program from Oracle that allows you to create virtual machines on your computer. It’s like having a separate computer running on top of your operating system. VirtualBox was originally created by Sun Microsystems.
Download Virtualbox
Head to the VirtualBox Linux download page and select the “All distributions” version. It comes in the form of a self-extracting archive. So you simply execute the file. Download
Install Virtualbox in Arch Linux
Make Virtualbox file executable
The file will need to be given rights to execute it. Use ‘chmod’ to enable the execute (‘x’) flag.
$ chmod +x ./VirtualBox-x.x.x-xxxxxx-Linux_amd64.run
replace ‘x’ with version
Installing Dependencies
Installation depends on several programs. It requires the headers for your currently running kernel to build the necessary modules. It builds those modules using the GCC compiler. So that will need to be installed if it’s not there. If we tried to run the installation without these prerequisites, we would be informed that the kernel modules for VirtualBox failed to be compiled. This applies if the modules for that version have never been compiled before. A list of programs required will be printed.First, we need to install the GNU GCC compiler, GNU make, and Perl if they’re not installed.
$ pacman -S gcc make perl
Then we need to install the kernel headers.
$ pacman -S linux-headers
Now we can successfully install VirtualBox.
$ ./VirtualBox-x.x.x-xxxxxx-Linux_amd64.run
Now you should have a working VirtualBox installation on Arch. This guide is really distro agnostic, that is, it doesn’t apply only to Arch. Any distro, especially bare-bones distros like Arch, will require the installation of prerequisites. Ensure you have those installed and VirtualBox will install successfully.