0

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

Bodo
  • 380
  • 2
    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) – guiverc Apr 14 '23 at 11:32
  • Sorry. I updated from 20.04 to 22.04 Jammy – Rakesh Sampat Apr 14 '23 at 11:37
  • 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. – guiverc Apr 14 '23 at 11:39
  • How to check what is wrong? is there a command that can be given to see whats wrong and i can share the screenshot – Rakesh Sampat Apr 14 '23 at 11:49
  • 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. – guiverc Apr 14 '23 at 11:52
  • 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. – Bodo Apr 14 '23 at 11:53
  • 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 – Rakesh Sampat Apr 14 '23 at 12:17
  • Your last comment includes a link; try opening that with a browser & you should quickly see what is wrong with it.... – guiverc Apr 14 '23 at 12:40
  • tried opening in browser using link. 404 error (Google) was what came up in response – Rakesh Sampat Apr 14 '23 at 12:52
  • The problem is resolved by using this command : sudo rm /etc/apt/sources.list.d/google.list – Rakesh Sampat Apr 15 '23 at 10:22

0 Answers0