Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Software Manager and Synaptic Package Manager aren't working. Software Manager won't open and when I open Synaptic, it tells me
"E: Malformed entry 1 in list file /etc/apt/sources.list.d/additional-repositories.list (Component)
E: The list of sources could not be read.
Go to the repository dialog to correct the problem.
E: _cache->open() failed, please report."
I had tried to download Wine and then this started happening. I'm very new to Linux so maybe I messed the download up?
The error message is telling you that the sources.list file is malformed. The package manager (software manager, software center, etc.) consults it to find out where to go on the internet to find the software repositories. Because the file is malformed, the process stops at that point.
Please post the contents of your /etc/apt/sources.list file, be sure to surround them with "code" tags, which become available when you click the "Go Advanced" button beneath the "compose post" window. The file is a plain text file that can be opened with any text editor.
I'm not sure I did this right, but I couldn't figure out exactly what you meant by "post the contents of your /etc/apt/sources.list file" Like I said I'm very new to this. Sorry.
Code:
$ apt-get update
E: Malformed entry 1 in list file /etc/apt/sources.list.d/additional-repositories.list (Component)
E: The list of sources could not be read.
$ for i in /etc/apt/sources.list{,.d/*}; do echo file: $i; cat $i; echo ====; done
file: /etc/apt/sources.list
#deb cdrom:[Linux Mint 19 _Tara_ - Release amd64 20180717]/ bionic contrib main non-free
====
file: /etc/apt/sources.list.d/additional-repositories.list
deb https://dl.winehq.org/wine-builds/ubuntu/bionic main
====
file: /etc/apt/sources.list.d/official-package-repositories.list
deb http://packages.linuxmint.com tara main upstream import backport
deb http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ bionic partner
====
file: /etc/apt/sources.list.d/spotify.list
# deb http://repository.spotify.com stable non-free
====
The file /etc/apt/sources.list.d/additional-repositories.list actually looks good to my eye. Did you copy and paste it from https://wiki.winehq.org/Ubuntu? The only thing I can think of is that there is an unusual non-printing character in there.
Which distro (and version) are you using?
Edit: Correction - there should be a space between ubuntu and bionic on that line.
I know. I should really turn in for the night. The software sources listing you provide clearly showed that you are using Tara, and I also missed the fact that you had neglected to add a space in the correct position of the relevant file. That's the problem with trying to think when I'm tired!
Ok, that's you up and running again. You can run apt upgrade now.
A couple of notes. Firstly, in future posts, remember to include your distro right from the start - it's often useful in helping folk focus on the answer more quickly. You might also want to edit your profile to add your distro, version and desktop environment (look to the left of this post for an example).
Also, your Spotify repo is commented out. Are you still using Spotify?
Finally, have you installed and are you using TimeShift?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.