I'm trying to install Guest additions in Lubuntu 22.04.

Discussions related to using VirtualBox on Windows hosts.
Post Reply
LPIII
Posts: 34
Joined: 18. Jun 2022, 01:23

I'm trying to install Guest additions in Lubuntu 22.04.

Post by LPIII »

This didn't work:

Code: Select all

sudo apt install linux-headers-$(uname -r) build-essential dkms
Nor:

Code: Select all

sudo apt-get install build-essential
So I clicked on Devices > Insert Guest Additions CD image. A pop-up Given the option to open in the file manager, so I clicked okay. I pressed F4 to open in terminal and ran:

Code: Select all

sudo ./VBoxLinuxAdditions.run
And got:
Program_Manager 19-07-2022 12⦂54⦂40⦂255 PM.png
Program_Manager 19-07-2022 12⦂54⦂40⦂255 PM.png (89.93 KiB) Viewed 4050 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: I'm trying to install Guest additions in Lubuntu 22.04.

Post by scottgus1 »

The error in the screenshot is because the header command didn't work.

Please see https://www.virtualbox.org/manual/ch02. ... nux-prereq for the prerequisites for official Guest Additions in the VM, same as for Virtualbox on the host (also https://www.virtualbox.org/manual/ch04. ... ions-linux). You'll note there's no mention of dkms, so the instructions you used for the commands above are non-official sources that we cannot help with.

I also did not have success inserting the '(uname -r)' into the apt install command. Per the linked instructions, run the "uname -r" as a separate command, then paste the result into the apt command.

If you have trouble, please elaborate more on what the trouble is:
LPIII wrote:This didn't work:
isn't distinctive enough to help with.
multiOS
Volunteer
Posts: 1223
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux, BSD
Location: United Kingdom

Re: I'm trying to install Guest additions in Lubuntu 22.04.

Post by multiOS »

@LPIII

The output from the attempted Guest Additions install states that the "gcc make perl" packages are missing from your Lubuntu VM and explicitly asks for them to be installed, so you need to try:

Code: Select all

sudo apt install gcc make perl
If the installation of the other dependencies required hadn't completed when you issued the commands then you should have seen an error message.
LPIII
Posts: 34
Joined: 18. Jun 2022, 01:23

Re: I'm trying to install Guest additions in Lubuntu 22.04.

Post by LPIII »

It turns out that I just needed to run:

Code: Select all

sudo apt-get update
Before:

Code: Select all

sudo apt install linux-headers-$(uname -r) build-essential dkms
And to installe the guest additions I needed to go to:

Code: Select all

Devices > Insert Guest Additions CD image
Open in the terminal and:

Code: Select all

sudo sh ./VBoxLinuxAdditions.run
Last edited by LPIII on 19. Aug 2022, 04:40, edited 1 time in total.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: I'm trying to install Guest additions in Lubuntu 22.04.

Post by scottgus1 »

Great! Glad you're up and running.
Post Reply