Score:0

I updated Ubuntu to 20.04 Jammy. After update i am unable to update anything at all as i keep getting message given below

cn flag

I updated ubuntu from 18.04 to 20.04 jammy. After the update, a red stop sign appeared and I am unable to update anything at all. Whatever I try, I get the following message:

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

How to solve? I am basic ubuntu user

guiverc avatar
cn flag
Please check your details; 18.04 was *bionic*, 20.04 was *focal* and 22.04 is *jammy*... You mention 20.04 but refer to it as *jammy* (it was *focal*). The *google* source however is unrelated to any system or upgrade; it's a user-added one as `/etc/apt/sources.list.d/` is empty (user add files exist there)
Rakesh Sampat avatar
cn flag
Sorry. I updated from 20.04 to 22.04 Jammy
guiverc avatar
cn flag
Your error tells you the problem is with `/etc/apt/sources.list.d/google.list` this file, and is in line 2. Someone with `sudo` rights on the system has added that file, as that directory is empty on a clean/new install. It contains invalid data on line 2 which needs correction, we cannot see what is on it, thus cannot advise on what's there, except it was added by user with `sudo` privileges.
Rakesh Sampat avatar
cn flag
How to check what is wrong? is there a command that can be given to see whats wrong and i can share the screenshot
guiverc avatar
cn flag
You can `cat /etc/apt/sources.list.d/google.list` to view what is inside the file, but given its not essential I'd just erase it. Editing and adding a "#" to the beginning of line 2 will turn that line into a comment, meaning that line will be ignored, however the system stopped reading the file at line 2 when an error existed, so subsequent lines may also contain errors too. Please don't share screenshots, but copy/paste the contents of text files.
Bodo avatar
pt flag
Please [edit] your question to add requested information. You can open the file in a text editor and copy&paste the text to your question, formatted as a code block, e.g. by using the `{}` tool of the editor field.
Rakesh Sampat avatar
cn flag
When i used the Cat /etc command, this is what the screen displayed: deb [arch=amd64] http://dl.google.com/linux/chrome/deb/stable main
guiverc avatar
cn flag
Your last comment includes a link; try opening that with a browser & you should quickly see what is wrong with it....
Rakesh Sampat avatar
cn flag
tried opening in browser using link. 404 error (Google) was what came up in response
Rakesh Sampat avatar
cn flag
The problem is resolved by using this command : sudo rm /etc/apt/sources.list.d/google.list
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.