0

I was installing virtualbox and when i enter this:

$ echo "deb {arch=amd64} http://virtualbox.org/virtualbox/debian
> (lsb_release -cs)contrib
> (lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list

This showed:

[sudo] password for marie: 
deb {arch=amd64} http://virtualbox.org/virtualbox/debian
(lsb_release -cs)contrib
(lsb_release -cs) contrib

I then try to do:

$ sudo apt-get update
Malformed entry 1 in list file /etc/apt/sources.list.d/virtualbox.list (Suite)
E: The list of sources could not be read.

Can someone help me please?

muru
  • 197,895
  • 55
  • 485
  • 740
  • 1
    Are you certain that you want the upstream virtualbox? The version in the Ubuntu repositories works very well and is much simpler to install. – user535733 Mar 05 '23 at 23:01
  • 1
    The command should have been echo "deb [arch=amd64] http://virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list all in one line. – muru Mar 09 '23 at 02:40
  • I disagree that this question is a duplicate. The problem isn't that there's a malformed line that needs to be removed, the problem is that the user typed something incorrect and it caused a malformed line. The answer (which @muru thankfully gave in the comments) is to overwrite the incorrectly created file with a new one created using the right command. – ArrayBolt3 Mar 09 '23 at 03:21

0 Answers0