How To Install Latest Oracle VM VirtualBox in Fedora Linux(29/30)

Thsi post will guide you how to install the latest version of VirtualBox on your Fedora Linux system. How do I Install VirtualBox 6.0 from the command line in Fedora 30 Linux Workstation.

install virtualbox fedora2

What is VirtualBox?


Oracle VM VirtualBox is a free and open-source hosted hypervisor for x86 virtualization, developed by Oracle Corporation. Created by Innotek GmbH, it was acquired by Sun Microsystems in 2008, which was, in turn, acquired by Oracle in 2010. VirtualBox may be installed on Windows, macOS, Linux, Solaris and OpenSolaris.

VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL) version 2.

Step1: Installing All Dependencies


Before installing VirtualBox package, you need to install all dependency packages, including development-tools, kernel-devel,kernel-headers,etc. Type the following command:

$ sudo dnf install @development-tools
$ sudo dnf install kernel-devel kernel-headers dkms elfutils-libelf-devel qt5-qtx11extras

Outputs:

[root@localhost ~]# dnf install @development-tools
Last metadata expiration check: 0:40:17 ago on Thu 26 Sep 2019 03:06:09 PM CST.
Dependencies resolved.
=============================================================================================================
Package Architecture Version Repository Size
=============================================================================================================
Installing group/module packages:
subversion x86_64 1.12.2-1.fc30 updates 1.1 M
systemtap x86_64 4.1-2.fc30 updates 7.4 k
diffstat x86_64 1.62-2.fc30 fedora 38 k
doxygen x86_64 1:1.8.15-6.fc30 fedora 4.3 M
patchutils x86_64 0.3.4-13.fc30 fedora 106 k
Installing dependencies:
annobin x86_64 8.71-3.fc30 updates 107 k
cpp x86_64 9.2.1-1.fc30 updates 9.8 M
gcc x86_64 9.2.1-1.fc30 updates 23 M
glibc-devel x86_64 2.29-22.fc30 updates 1.0 M
glibc-headers x86_64 2.29-22.fc30 updates 473 k
kernel-headers x86_64 5.2.16-200.fc30 updates 1.2 M
libxcrypt-devel x86_64 4.4.10-1.fc30 updates 35 k
subversion-libs x86_64 1.12.2-1.fc30 updates 1.5 M
systemtap-client x86_64 4.1-2.fc30 updates 3.6 M
systemtap-devel x86_64 4.1-2.fc30 updates 2.2 M
systemtap-runtime x86_64 4.1-2.fc30 updates 448 k
utf8proc x86_64 2.3.0-1.fc30 updates 63 k
dyninst x86_64 10.0.0-7.fc30 fedora 3.8 M
isl x86_64 0.16.1-8.fc30 fedora 796 k
libserf x86_64 1.3.9-11.fc30 fedora 54 k
mokutil x86_64 1:0.3.0-11.fc30 fedora 41 k
xapian-core-libs x86_64 1.4.10-1.fc30 fedora 737 k
Installing weak dependencies:
kernel-devel x86_64 5.2.16-200.fc30 updates 13 M
Installing Groups:
Development Tools

Transaction Summary
=============================================================================================================
Install 23 Packages

Total download size: 68 M
Installed size: 224 M
Is this ok [y/N]:y

[root@localhost ~]# dnf install kernel-devel kernel-headers dkms elfutils-libelf-devel qt5-qtx11extras
Last metadata expiration check: 0:42:49 ago on Thu 26 Sep 2019 03:06:09 PM CST.
Package kernel-devel-5.2.16-200.fc30.x86_64 is already installed.
Package kernel-headers-5.2.16-200.fc30.x86_64 is already installed.
Package qt5-qtx11extras-5.12.4-1.fc30.x86_64 is already installed.
Dependencies resolved.
=============================================================================================================================
Package Architecture Version Repository Size
=============================================================================================================================
Installing:
elfutils-libelf-devel x86_64 0.177-1.fc30 updates 23 k
dkms noarch 2.6.1-3.fc30 fedora 78 k
Installing dependencies:
zlib-devel x86_64 1.2.11-18.fc30 updates 46 k

Transaction Summary
=============================================================================================================================
Install 3 Packages

Total download size: 147 k
Installed size: 388 k
Is this ok [y/N]:y

Step2: Downloading VirtualBox Repository


As VirtualBox package is not available in the defualt Fedora repository, you have to download VirtualBox official repository to your local disk under /etc/yum.repos.d/ directory by using the following wget command, type:

$ wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo -P /etc/yum.repos.d/

Outputs:

[root@localhost ~]# wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo -P /etc/yum.repos.d/
--2019-09-26 15:51:53-- http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
Resolving download.virtualbox.org (download.virtualbox.org)... 23.76.85.113
Connecting to download.virtualbox.org (download.virtualbox.org)|23.76.85.113|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 241 [text/plain]
Saving to: ‘/etc/yum.repos.d/virtualbox.repo’

virtualbox.repo 100%[====================================================>] 241 --.-KB/s in 0s

2019-09-26 15:51:55 (12.3 MB/s) - ‘/etc/yum.repos.d/virtualbox.repo’ saved [241/241]

[root@localhost ~]# ls /etc/yum.repos.d/virtualbox.repo -al
-rw-r--r--. 1 root root 241 Sep 30 2015 /etc/yum.repos.d/virtualbox.repo

Step3: Importing GPG key For VirtualBox Package


Once VirtualBox Repo is downloaded, and you still need to import GPG key for signing your package by runing the following command:

$ dnf updates

or

$ dnf search virtualbox

Outputs:

[root@localhost ~]# dnf update
Fedora 30 - x86_64 - VirtualBox 192 B/s | 181 B 00:00
Fedora 30 - x86_64 - VirtualBox 1.1 kB/s | 1.7 kB 00:01
Importing GPG key 0x98AB5139:
Userid : "Oracle Corporation (VirtualBox archive signing key) <info@virtualbox.org>"
Fingerprint: 7B0F AB3A 13B9 0743 5925 D9C9 5442 2A4B 98AB 5139
From : https://www.virtualbox.org/download/oracle_vbox.asc
Is this ok [y/N]:y

[root@localhost ~]# dnf search virtualbox
Fedora 30 - x86_64 - VirtualBox 274 B/s | 181 B 00:00
Fedora 30 - x86_64 - VirtualBox 1.1 kB/s | 1.7 kB 00:01
Importing GPG key 0x98AB5139:
Userid : "Oracle Corporation (VirtualBox archive signing key) <info@virtualbox.org>"
Fingerprint: 7B0F AB3A 13B9 0743 5925 D9C9 5442 2A4B 98AB 5139
From : https://www.virtualbox.org/download/oracle_vbox.asc
Is this ok [y/N]: y
Fedora 30 - x86_64 - VirtualBox 64 kB/s | 84 kB 00:01
Last metadata expiration check: 0:00:01 ago on Thu 26 Sep 2019 03:55:45 PM CST.
============================================ Name & Summary Matched: virtualbox =============================================
VirtualBox-5.2.x86_64 : Oracle VM VirtualBox
VirtualBox-6.0.x86_64 : Oracle VM VirtualBox

Note: you need to press y key on your keyboard when prompted.

Step4: Installing VirtualBox on Fedora


Now you can install the latest version of virtualbox from its official repository with the following dnf command, type:

$ sudo dnf install VirtualBox-6.0

Outputs:

[root@localhost ~]# dnf install VirtualBox-6.0
Last metadata expiration check: 0:06:29 ago on Thu 26 Sep 2019 03:55:45 PM CST.
Dependencies resolved.
==================================================================================================================================
Package Architecture Version Repository Size
==================================================================================================================================
Installing:
VirtualBox-6.0 x86_64 6.0.12_133076_fedora29-1 virtualbox 110 M
Installing dependencies:
compat-libvpx5 x86_64 1.7.0-1.fc30 fedora 793 k

Transaction Summary
==================================================================================================================================
Install 2 Packages

Total download size: 111 M
Installed size: 232 M
Is this ok [y/N]: y

Downloading Packages:
(1/2): compat-libvpx5-1.7.0-1.fc30.x86_64.rpm 3.5 MB/s | 793 kB 00:00
(2/2): VirtualBox-6.0-6.0.12_133076_fedora29-1.x86_64.rpm 1.0 MB/s | 110 MB 01:47
----------------------------------------------------------------------------------------------------------------------------------
Total 1.0 MB/s | 111 MB 01:49
warning: /var/cache/dnf/virtualbox-c0de060bf8bf6c0c/packages/VirtualBox-6.0-6.0.12_133076_fedora29-1.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 98ab5139: NOKEY
Fedora 30 - x86_64 - VirtualBox 1.1 kB/s | 1.7 kB 00:01
Importing GPG key 0x98AB5139:
Userid : "Oracle Corporation (VirtualBox archive signing key) <info@virtualbox.org>"
Fingerprint: 7B0F AB3A 13B9 0743 5925 D9C9 5442 2A4B 98AB 5139
From : https://www.virtualbox.org/download/oracle_vbox.asc
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : compat-libvpx5-1.7.0-1.fc30.x86_64 1/2
Running scriptlet: VirtualBox-6.0-6.0.12_133076_fedora29-1.x86_64 2/2
Installing : VirtualBox-6.0-6.0.12_133076_fedora29-1.x86_64 2/2
Running scriptlet: VirtualBox-6.0-6.0.12_133076_fedora29-1.x86_64 2/2

Creating group 'vboxusers'. VM users must be member of that group!

Verifying : compat-libvpx5-1.7.0-1.fc30.x86_64 1/2
Verifying : VirtualBox-6.0-6.0.12_133076_fedora29-1.x86_64 2/2

Installed:
VirtualBox-6.0-6.0.12_133076_fedora29-1.x86_64 compat-libvpx5-1.7.0-1.fc30.x86_64

Complete!

Step5: Adding VirtualBox User to vboxusers Group


After VirtualBox package is installed, and you still need to add your current user to a group “vboxusers” created automatically during installation. Type:

$ sudo usermod -a -G vboxusers devops

Outputs:

[root@localhost ~]# usermod -a -G vboxusers devops

[root@localhost ~]# id devops
uid=1006(devops) gid=1000(devops) groups=1000(devops),975(vboxusers)

Step6: Lauching VirtualBox 6.0


Now you can type the following command to start VirtualBox from the terminal on your Fedora Workstation system. Type:

$ virtualbox

install virtualbox fedora1

Conclusion


You should know that how to install the latest version of VirtualBox in Fedora Linux system.

You might also like:

Sidebar



back to top