skip to Main Content

I am using Ubuntu 20.04 with Virtualbox on a Windows PC.
I am trying to install libraries or simply update using apt-get by using:

 sudo apt-get install libncurses5-dev libncursesw5-dev

 sudo apt-get update

 apt-get update

but they all give this error:

E: Malformed entry 58 in list file /etc/apt/sources.list (Component)

E: The list of sources could not be read.

Line 58 in my sources.list is:

deb http://download.virtualbox.org/virtualbox/debian contrib

I am connected to the internet and I have disabled the firewall using
$ sudo ufw disable

I’ve seen other people have fixed their problem by changing the line that gives them an error but it is not the same as mine and I don’t have enough experience to know what to change. Any ideas? Thanks in advance!

2

Answers


  1. Try the following:

    deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian focal contrib
    
    Login or Signup to reply.
  2. this will fix it:

    sed -i '/download.virtualbox.org/d' /etc/apt/sources.list
    echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" >> /etc/apt/sources.list
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search