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

Asked by Stefank

When I open Synaptic I get the following message:

"An error occurred.
The following details are provided:

E: Malformed entry 58 in list file /etc/apt/sources.list (Component)
E: The list of sources could not be read.
E: _cache->open() failed, please report.

Close"

What I had done was try to install WINE.
First I used Synaptic to install WINE, but, when I right-clicked on the .exe file, I did not get the "Open with a WINE application" option.
Then I uninstalled WINE via Synaptic and tried to follow the directions from the Ubuntu page of Wine HQ to install the Focal version from Terminal. When I typed sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main', I got:

"E: Malformed entry 58 in list file /etc/apt/sources.list (Component)
E: The list of sources could not be read.".

However, I am pretty sure I typed the correct source including the space before "focal main". The same thing happened when I did a copy and paste. I closed the Terminal, rebooted, retried and got the same problem in Terminal. Also the new problem in Synaptic.

Can you help me:
1. Repair Synaptic
2. Get me any usable version of WINE?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Let's start with the package management error.
Some details in your output indicate that the cause might not be the "add-apt-repository" command but something else.

Please provide the output that you receive for the commands

uname -a
lsb_release -crid
find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;

Revision history for this message
Stefank (stefankarpik) said :
#2

Dear Manfred,

It seems that I did make a spelling mistake in line 58, which I corrected later.

stefank@stefank-Inspiron-5567:~$ uname -a
Linux stefank-Inspiron-5567 5.8.0-50-generic #56~20.04.1-Ubuntu SMP Mon Apr 12 21:46:35 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
stefank@stefank-Inspiron-5567:~$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
stefank@stefank-Inspiron-5567:~$ find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;

/etc/apt/sources.list

     1 # deb cdrom:[Ubuntu 20.04.2.0 LTS _Focal Fossa_ - Release amd64 (20210209.1)]/ focal main restricted
     2
     3 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
     4 # newer versions of the distribution.
     5 deb http://gb.archive.ubuntu.com/ubuntu/ focal main restricted
     6 # deb-src http://gb.archive.ubuntu.com/ubuntu/ focal main restricted
     7
     8 ## Major bug fix updates produced after the final release of the
     9 ## distribution.
    10 deb http://gb.archive.ubuntu.com/ubuntu/ focal-updates main restricted
    11 # deb-src http://gb.archive.ubuntu.com/ubuntu/ focal-updates main restricted
    12
    13 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    14 ## team. Also, please note that software in universe WILL NOT receive any
    15 ## review or updates from the Ubuntu security team.
    16 deb http://gb.archive.ubuntu.com/ubuntu/ focal universe
    17 # deb-src http://gb.archive.ubuntu.com/ubuntu/ focal universe
    18 deb http://gb.archive.ubuntu.com/ubuntu/ focal-updates universe
    19 # deb-src http://gb.archive.ubuntu.com/ubuntu/ focal-updates universe
    20
    21 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    22 ## team, and may not be under a free licence. Please satisfy yourself as to
    23 ## your rights to use the software. Also, please note that software in
    24 ## multiverse WILL NOT receive any review or updates from the Ubuntu
    25 ## security team.
    26 deb http://gb.archive.ubuntu.com/ubuntu/ focal multiverse
    27 # deb-src http://gb.archive.ubuntu.com/ubuntu/ focal multiverse
    28 deb http://gb.archive.ubuntu.com/ubuntu/ focal-updates multiverse
    29 # deb-src http://gb.archive.ubuntu.com/ubuntu/ focal-updates multiverse
    30
    31 ## N.B. software from this repository may not have been tested as
    32 ## extensively as that contained in the main release, although it includes
    33 ## newer versions of some applications which may provide useful features.
    34 ## Also, please note that software in backports WILL NOT receive any review
    35 ## or updates from the Ubuntu security team.
    36 deb http://gb.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
    37 # deb-src http://gb.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
    38
    39 ## Uncomment the following two lines to add software from Canonical's
    40 ## 'partner' repository.
    41 ## This software is not part of Ubuntu, but is offered by Canonical and the
    42 ## respective vendors as a service to Ubuntu users.
    43 # deb http://archive.canonical.com/ubuntu focal partner
    44 # deb-src http://archive.canonical.com/ubuntu focal partner
    45
    46 deb http://security.ubuntu.com/ubuntu focal-security main restricted
    47 # deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
    48 deb http://security.ubuntu.com/ubuntu focal-security universe
    49 # deb-src http://security.ubuntu.com/ubuntu focal-security universe
    50 deb http://security.ubuntu.com/ubuntu focal-security multiverse
    51 # deb-src http://security.ubuntu.com/ubuntu focal-security multiverse
    52
    53 # This system was installed using small removable media
    54 # (e.g. netinst, live or single CD). The matching "deb cdrom"
    55 # entries were disabled at the end of the installation process.
    56 # For information about how to configure apt package sources,
    57 # see the sources.list(5) manual.
    58 deb https://dl.winehq.org/wine-builds/ubuntu/focal main
    59 # deb-src https://dl.winehq.org/wine-builds/ubuntu/focal main
    60 deb https://dl.winehq.org/wine-builds/ubunt/ focal main
    61 # deb-src https://dl.winehq.org/wine-builds/ubunt/ focal main
    62 deb https://dl.winehq.org/wine-builds/ubuntu/ focal main
    63 # deb-src https://dl.winehq.org/wine-builds/ubuntu/ focal main
    64 deb focal main
    65 # deb-src focal main
    66 deb http://dl.winehq.org/wine-builds/ubuntu/ focal main
    67 # deb-src http://dl.winehq.org/wine-builds/ubuntu/ focal main
stefank@stefank-Inspiron-5567:~$

Yours sincerely,

Stefan Karpik

________________________________
From: <email address hidden> <email address hidden> on behalf of Manfred Hampl <email address hidden>
Sent: 29 April 2021 09:01
To: <email address hidden> <email address hidden>
Subject: Re: [Question #696811]: E: Malformed entry 58 in list file /etc/apt/sources.list (Component)

Your question #696811 on Ubuntu changed:
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fanswers.launchpad.net%2Fubuntu%2F%2Bquestion%2F696811&amp;data=04%7C01%7C%7C2427aeab6b7741cce30a08d90ae50122%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552800939777321%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Ps5dEdUaWQiOF5smzth67MQuORKN10HQshk0CFyvbxc%3D&amp;reserved=0

    Status: Open => Needs information

Manfred Hampl requested more information:
Let's start with the package management error.
Some details in your output indicate that the cause might not be the "add-apt-repository" command but something else.

Please provide the output that you receive for the commands

uname -a
lsb_release -crid
find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;

--
To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fanswers.launchpad.net%2Fubuntu%2F%2Bquestion%2F696811&amp;data=04%7C01%7C%7C2427aeab6b7741cce30a08d90ae50122%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552800939777321%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Ps5dEdUaWQiOF5smzth67MQuORKN10HQshk0CFyvbxc%3D&amp;reserved=0

You received this question notification because you asked the question.

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#3

Yes, it was the attempt to add the wine repository.

Open a terminal window and issue the command

sudo gedit /etc/apt/sources.list
In the editor that opens scroll down to the end and remove everything starting from line 58 onward (the first occurrence of wine)
Save the file and close the editor.

Then look at https://wiki.winehq.org/Ubuntu for instructions how to add the winehq repository. I strongly recommend to copy the add-apt-repository command from there.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

Looks like you went a bit paste-happy with the text file.

Revision history for this message
Stefank (stefankarpik) said :
#5

I can now open Synaptic and it confirms that I have downloaded the stable version of Wine HQ for Focal Getting it to work is another problem, but I'll ask Wine HQ. Thank you for your help, Manfred Hampl.