[SOLVED] VirtualBox won't install and causes weird issues.

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
User avatar
Papasot
Donor
Posts: 247
Joined: 3. May 2015, 18:37
Location: Patras, Greece

[SOLVED] VirtualBox won't install and causes weird issues.

Post by Papasot »

I now have two machines running 15.0 and in general I am quite happy with them. I found zero issues so far, from a programmer's point of view. However I tried to install VirtualBox, which used to work flawlessly in 14.2, but I encountered problems. In fact I used this installation script, which is the one I used a few days ago to install the latest version of VirtualBox in the exact same machines running 14.2 back then. For some reason, it doesn't work on 15.0. While installing, it complains about systemctl first:

Code: Select all

VirtualBox Version 6.1.38 r153438 (2022-09-01T14:25:36Z) installer
./routines.sh: line 239: systemctl: command not found
This is a systemd component, which is not in my system (and it will never be). Now, I know for a fact that VirtualBox doesn't need systemd, because it used to run in 14.2 until yesterday, when I switched to 15.0. I never saw such a message while installing the same version of VirtualBox in 14.2, and it just worked. Now it keeps complaining about systemctl 3 times then:

Code: Select all

This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
So now it complains about kernel headers missing (which is not true, the headers are installed by default). Nevertheless it continues by just saying there were problems. Of course the installed VirtualBox doesn't work (it crashes immediately if I try to run it).

Maybe this is a good time to migrate to QEMU/virt-manager, but I have at least six new Salix 15.0 installations ahead and no time to learn another virtual machine manager. So I'm still wondering why the same installation script works perfectly in 14.2 without complaining about the non existent but "required" systemctl and the existent but not seen kernel headers. My guess is something is missing in 15.0, at least in the default "full" installation, and I couldn't find anything related in the repos.
A pleasant detail in this forum: several people pick a picture of their pet as their avatar. Who am I to do otherwise? ;-)
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: VirtualBox won't install and causes weird issues.

Post by djemos »

suppose you have installed the kernel-source package
Please try this maybe will work.
Be sure that the line SOURCE=https://www.slackbuilds.org/slackbuilds/15.0/
exists in /etc/slapt-get/slapt-srcrc otherwise add it in the end.

Code: Select all

sudo slapt-src -u
sudo slapt-src -i virtualbox
sudo slapt-src -i virtualbox-kernel
Then try to run again virtual-box
User avatar
Papasot
Donor
Posts: 247
Joined: 3. May 2015, 18:37
Location: Patras, Greece

Re: VirtualBox won't install and causes weird issues.

Post by Papasot »

djemos wrote: 7. Sep 2022, 14:55 suppose you have installed the kernel-source package
Please try this maybe will work.
Be sure that the line SOURCE=https://www.slackbuilds.org/slackbuilds/15.0/
exists in /etc/slapt-get/slapt-srcrc otherwise add it in the end.

Code: Select all

sudo slapt-src -u
sudo slapt-src -i virtualbox
sudo slapt-src -i virtualbox-kernel
Then try to run again virtual-box
This actually worked. Of course it takes time to build VirtualBox from source (3+ hours in my machine), but it works in the end. The SBo version is a few months old (6.1.34) but I couldn't care less about that. Thank you Dimitri!

However, I also noticed that installing VirtualBox from Oracle's installation script I mentioned above also works, provided kernel-source is installed - which is weird because the installer complained about kernel headers, not source. At any rate, with kernel-source installed it keeps complaining about systemctl but it completes the installation without error messages.

Either way (building from SBo or installing using Oracle's script), VirtualBox is now installed but it crashes when I try to run it. However the message I got at console helped figuring out where is the problem: By default, VirtualBox checks for updates when it is started and that, for some reason, crashes the system. It turns out this is not a new problem, and it is related to Slackware. The problem is just not that old to affect 14.2. This explains why I had such a problem in 15.0 and not before. You can find more details here, but the solution is to tell VirtualBox not looking for updates at start, Just do (once):

Code: Select all

VBoxManage setextradata global GUI/UpdateDate never
and don't try to check for updates via the GUI. I can live with that; otherwise, everything works, I actually imported saved VMs at Salix 15.0 and they all work as expected.

P.S: For some reason I cannot modify my initial post in this thread, so I cannot add [Solved] to the title.
A pleasant detail in this forum: several people pick a picture of their pet as their avatar. Who am I to do otherwise? ;-)
Post Reply