Err msg when updating repository on terminal

Got the following error message while trying to update the VirtualBox repository (thought I could try to manually install it in the terminal):

sudo add-apt-repository "deb [arch=amd64] Index of http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) main"
Repository: 'deb [arch=amd64] Index of http://download.virtualbox.org/virtualbox/debian jammy main'
Description:
Archive for codename: jammy components: main
More info: Index of http://download.virtualbox.org/virtualbox/debian
Adding repository.
Press [ENTER] to continue or Ctrl-c to cancel.
Adding deb entry to /etc/apt/sources.list.d/archive_uri-http_download_virtualbox_org_virtualbox_debian-jammy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/archive_uri-http_download_virtualbox_org_virtualbox_debian-jammy.list
E: Malformed entry 1 in list file /etc/apt/sources.list.d/oracle-virtualbox.list (Component)
E: The list of sources could not be read.

Thanks

Did You followed the Steps of the Download-Page of their Website? Or as an Alternative simply download the .deb File from the Page? You have to choose the one for Ubuntu 22.04 because Zorin 17 is based on this.

The command came from file called "Install VirtualBox 7.1.4 on Zorin 17.2". It was from a forum on virtualbox.org. It was only the first command to update the VirtualBox repository.

Are you saying that that updating the repository only puts out the latest version of Virtual Box?,, because I haven't even tried a sudo apt install command yet.
Are you saying that VB 7.1.4 is the wrong version for Zorin 17?

You do not need to add the VirtualBox repository unless you are looking for a specific package version.

Since Virtualbox (6.1.50) is already in the Universe repository, you can remove the malformed repo entry:

sudo -i

nautilus

Navigate to Other Location > Computer > /etc/apt/sources.list.d

Right click to trash or delete.

Then install VirtualBox from Universe repo:

sudo apt update && sudo apt install -y virtualbox

1 Like

It seems that this command should add the Virtualbox own Repository. But that wasn't the right Way. The Procedure is explained under the Link what I've posted.

But the Repo isn't needed. You can download from the Download Page a .deb file to install the newest Version. But You have to take Care to choose the right one. Because Zorin 17 is Based on Ubuntu 22.04, You have to take the Version for this:

Of Course, You can take the Version of the included System Repo's, too. @Aravisian already wrote You down the Command for it: