[SOLVED] Cant run sudo apt-get update command

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Mathews

[SOLVED] Cant run sudo apt-get update command

Post by Mathews »

I tried running the sudo apt-get update command from the terminal and I get this error '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.'
Anybody with the solution please help.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Sir Charles

Re: Cant run sudo apt-get update command

Post by Sir Charles »

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.
Hi Mathews,
Could you runcat /etc/apt/sources.list.d/additional-repositories.listin a terminal and post the output?
User avatar
all41
Level 19
Level 19
Posts: 9520
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Cant run sudo apt-get update command

Post by all41 »

Just open 'Software Scources'/PPAs and temporarily deselect all the added PPAs
Then do your updates:
apt update
After your Mint updates you can reselect the PPAs one by one to find the offender.
One bad apple spoils the barrel
Everything in life was difficult before it became easy.
Mathews

Re: Cant run sudo apt-get update command

Post by Mathews »

Marziano wrote: Sat Jun 23, 2018 7:07 pm
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.
Hi Mathews,
Could you runcat /etc/apt/sources.list.d/additional-repositories.listin a terminal and post the output?
This is the output

Code: Select all

cat /etc/apt/sources.list.d/additional-repositories.list
deb https://dl.winehq.orq/wine-builds/ubuntu/xenial main
deb https://dl.winehq.org/wine-builds/ubuntu/xenialmain
deb https://dl.winehq.org/wine-builds/ubuntu/xenial main
I had tried to download wine from the terminal earlier probably that's why it looks like that...
Mathews

Re: Cant run sudo apt-get update command

Post by Mathews »

all41 wrote: Sat Jun 23, 2018 7:12 pm Just open 'Software Scources'/PPAs and temporarily deselect all the added PPAs
Then do your updates:
apt update
After your Mint updates you can reselect the PPAs one by one to find the offender.
One bad apple spoils the barrel
I don’t really have any added PPAs
Sir Charles

Re: Cant run sudo apt-get update command

Post by Sir Charles »

Alright, run:

Code: Select all

gksudo xed /etc/apt/sources.list.d/additional-repositories.list
When the file opens, delete the 2nd and the 3rd row. Save and close the file.
Next run:

Code: Select all

sudo apt-get update
User avatar
Moem
Level 22
Level 22
Posts: 16230
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Cant run sudo apt-get update command

Post by Moem »

Mathews wrote: Sun Jun 24, 2018 10:29 am I don’t really have any added PPAs
Are you sure? Because that Wine PPA sure looks like an added PPA to me.
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
Sir Charles

Re: Cant run sudo apt-get update command

Post by Sir Charles »

Moem wrote: Sun Jun 24, 2018 10:37 am
Mathews wrote: Sun Jun 24, 2018 10:29 am I don’t really have any added PPAs
Are you sure? Because that Wine PPA sure looks like an added PPA to me.
There seems to be a "subtle" difference between a "PPA" and an "Additional repository". A "PPA" is hosted by Launchpad, the software collaboration platform created by Canonical. On the other hand, any software developer can host his/her/its own repository providing .deb packages to be installed by the users. Like Oracle providing Virtualbox.

When you add a PPA to your system, likesudo add-apt-repository ppa:libreoffice/ppa, the PPA's verification key will be added automatically to the system.

When you add a repository as "Additional", like:
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
you would need to instruct the system explicitly to fetch and add the key:
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

This is probably why they show under two different tabs in Software Sources.

In this case, it is about an "Additional repository" and not a "PPA"

What are Repositories?
User avatar
karlchen
Level 23
Level 23
Posts: 18212
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Cant run sudo apt-get update command

Post by karlchen »

Hello, Mathews.

The content of the file should /etc/apt/sources.list.d/additional-repositories.list read

Code: Select all

deb https://dl.winehq.orq/wine-builds/ubuntu/ xenial main
I.e. the same malformed entry, malformed in different way partially, is present 3 times.
Keep only the first line and add the missing space before the nickname xenial.

Cheers,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 771 days now.
Lifeline
Sir Charles

Re: Cant run sudo apt-get update command

Post by Sir Charles »

Nice catch, Karl!
Thanks!
:D

deb https://dl.winehq.orq/wine-builds/ubuntu/ xenial main
User avatar
Moem
Level 22
Level 22
Posts: 16230
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Cant run sudo apt-get update command

Post by Moem »

Marziano wrote: Sun Jun 24, 2018 10:59 am There seems to be a "subtle" difference between a "PPA" and an "Additional repository". A "PPA" is hosted by Launchpad, the software collaboration platform created by Canonical. On the other hand, any software developer can host his/her/its own repository providing .deb packages to be installed by the users. Like Oracle providing Virtualbox.
(...)
Thanks, that's good information!
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
Sir Charles

Re: Cant run sudo apt-get update command

Post by Sir Charles »

@Moem
You're welcome!
Mathews

Re: Cant run sudo apt-get update command

Post by Mathews »

Thank you guys it did work. Y'all awesome
Sir Charles

Re: Cant run sudo apt-get update command

Post by Sir Charles »

That's great! :D it worked out!
Cheers
User avatar
karlchen
Level 23
Level 23
Posts: 18212
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: [SOLVED] Cant run sudo apt-get update command

Post by karlchen »

<moderator on> Split off new name resolution problem into new thread here: "apt-get update" fails with "could resolve name" </moderator off>
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 771 days now.
Lifeline
Locked

Return to “Beginner Questions”