Install VirtualBox on RHEL, CentOS, AlmaLinux, Rocky Linux or Oracle Linux

Last updated on October 10, 2022

This how-to is about installing VirtualBox on Red Hat Enterprise Linux (RHEL). Provided instructions should also work on CentOS, AlmaLinux, Rocky Linux or Oracle Linux.

It is possible to install VirtualBox from rpm packages, which can be downloaded on the VirtualBox Linux downloads page. However, a yum-style repository is also provided – we’ll use the latter.

Install DKMS, use sudo

Before installing VirtualBox, one should install DKMS, as VirtualBox will build its own kernel module. This howto also supposes that you have added yourself to the sudoers list (of course, you may as well use su or log in as root).

DKMS has some important dependencies like gcc and kernel-devel. Use the following command line to install DKMS and its dependancies:
sudo yum install dkms

Install Virtualbox

Once DKMS an its dependencies are installed, we can download and add the repo file to /etc/yum.repos.d/:
sudo wget -P /etc/yum.repos.d http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

Finally, VirtualBox is ready to install:
sudo yum install VirtualBox-6.1

Add yourself to the vboxusers group using the “Users and Groups” application or the command line:
sudo usermod -a -G vboxusers your_user_name

It is possible to use VirtualBox without adding yourself (as a user) to the vboxusers group. If you don’t, some functions may be unavailable, as using USB devices on the guest system.

Run Virtualbox

VirtualBox should now be available in the menu or running VirtualBox. Don’t forget to install the non-free Extension Pack via the “File → Preferences → Extensions” menu.

Screenshot of VirtualBox running Windows on CentOS
Sometimes, running Windows 7, 8.1 or 10 is not vintage enough

Miscellaneous: USB, Network drives

If you get problems using USB, take a look at the CentOS Wiki. Make sure your user belongs to the usergroup vboxusers.

To share any folder as a network drive, just enter the following command at the MSDOS prompt:
net use x: \\vboxsvr\your_shared_folder

By Johannes Eva, April 2012 – October 2022
This article has been linked on LXer.com and some more…

Picture copyright: chameleon with a red hat, detail from this VirtualBox original artwork, unknown license.

Articles by categories

Most Read Articles

Comments

15 thoughts on “How to install LibreOffice 24.2 on Linux Mint, Ubuntu, MX Linux, Debian…”

  1. You may use the official appimage in Libre Office as well. In fact, on Linux Mint 21 you can’t get rid of the default LO as it may lead to dependency issues. Appimage helps.

  2. Pingback: Ubuntu 21.04: Essentials – Linux Sagas

  3. Issuing $ sudo apt-get remove libreoffice-core installs an office core no gui. With or without purging. Yielding this:
    The following packages will be REMOVED:
    libreoffice-base libreoffice-calc libreoffice-core libreoffice-draw libreoffice-gnome libreoffice-gtk3 libreoffice-impress libreoffice-lightproof-ru-ru libreoffice-math libreoffice-nlpsolver libreoffice-report-builder libreoffice-report-builder-bin libreoffice-script-provider-python libreoffice-sdbc-postgresql libreoffice-wiki-publisher python3-uno
    The following NEW packages will be installed:
    libreoffice-core-nogui

    Many thanks for any clarification!

    1. Right! The correct command for removing completely the stock LibreOffice on Linux is the following:
      sudo apt purge libreoffice-common

      The following command also works but misses some packages:
      sudo apt purge libreoffice*

      Thank you for your comment, I updated the article accordingly.

  4. NOTE:- I found that Libre Office version 6.3.2.2 is extremely buggy, it has major dependency problems attempting to install on Linux Mint (Tina 19.2). I wasn’t able to resolve these problems so had to revert the install (remove 6.3.2.2-2) and return to previous version 6.3.1 which works fine.

    **Windows 10 (1903) ALSO NOTE that LO 6.3.2.2 installs on W10 but also caused major performance issues and hung my system on reboot. My machine Borked badly so once again had to revert back to LO 6.3.1 which works fine.

  5. Thanks for the Terminal codes. Newbies like me just want it to work and your codes provide the copy and paste necessities for Linux to do its magic.

    (If it can’t be done in Linux (and LibreOffice) its not worth doing)

  6. please help me with this error, newbee here

    root@Anon:~/libreoffice# sudo dpkg -i *.deb
    dpkg: error: dpkg status database is locked by another process
    root@Anon:~/libreoffice# cd LibreOffice_6.0.2.1_Linux_x86_deb
    root@Anon:~/libreoffice/LibreOffice_6.0.2.1_Linux_x86_deb# sudo dpkg -i *.deb
    dpkg: error: dpkg status database is locked by another process
    root@Anon:~/libreoffice/LibreOffice_6.0.2.1_Linux_x86_deb# cd debs
    bash: cd: debs: No such file or directory
    root@Anon:~/libreoffice/LibreOffice_6.0.2.1_Linux_x86_deb# cd DEBS
    root@Anon:~/libreoffice/LibreOffice_6.0.2.1_Linux_x86_deb/DEBS# sudo dpkg -i *.deb
    dpkg: error: dpkg status database is locked by another process
    root@Anon:~/libreoffice/LibreOffice_6.0.2.1_Linux_x86_deb/DEBS# sudo dpkg -i *.deb
    dpkg: error: dpkg status database is locked by another process

    1. The last line says it all: check if you are running another instance of dpkg. In last resort, try to remove dpkg lock file:

      sudo rm /var/lib/dpkg/lock

      Then let dpkg fix itself:
      sudo dpkg --configure -a

      Note that this problem is not per se related to LibreOffice.

  7. Would be useful to know how to install such alongside the native repository install of LibreOffice – without conflict. Would be useful to be able to choose, say, LibreOffice Writer 5.2, vs just LibreOffice Writer. Migrations / new versions not always working as seamlessly as one might like with files one might already have. It can be very frustrating to have a new version munge (e.g. formatting) of a current document one depends on, and not being able to ‘un-munge’ it.

  8. Works well. The only problem I had is that the icons were not created. I created them manually by running Writer, Calc and Impress and the using the “Lock to Launcher” option. This is how to run them from the terminal:

    Writer: /opt/libreoffice5.0/program/oosplash –writer
    Calc: /opt/libreoffice5.0/program/oosplash –calc
    Impress: /opt/libreoffice5.0/program/oosplash –impress

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.