Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Wrong sources.list entry or malformed file" for Chrome while using `apt-get update`

I am trying to use

sudo apt-get update
But i am getting error as,
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release  Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead. 

I tired the solution given in https://askubuntu.com/questions/120621/how-to-fix-duplicate-sources-list-entry, but again showing the same error. Suggest me something.

like image 346
krocks Avatar asked Mar 03 '16 11:03

krocks


2 Answers

It looks like Google has discontinued support for i386, which is why this error now shows up. It looks like they have not gracefully for how their deb install has configured apt. To fix this run the following.

sudo sed -i -e 's/deb http/deb [arch=amd64] http/' "/etc/apt/sources.list.d/google-chrome.list"

Source: https://www.reddit.com/r/chrome/comments/48oje6/linux_how_to_fix_failed_to_fetch/

Edit: As has been pointed out by others, another command is needed to prevent this fix from reverting. Since this is at the top as the accepted answer I feel it should be part of this answer.

sudo sed -i -e 's/deb http/deb [arch=amd64] http/' "/opt/google/chrome/cron/google-chrome"
like image 98
David Baucum Avatar answered Oct 03 '22 12:10

David Baucum


Also, this issue may exist if there are two files with name google.list and google-chrome.list in /etc/apt/sources.list.d directory with the similar entry like:

In google.list:

  deb http://dl.google.com/linux/chrome/deb/ stable main

In google-chrome.list:

  deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main

Then you should remove google.list file or uncomment its entry like below:

  #deb http://dl.google.com/linux/chrome/deb/ stable main
like image 25
0xAliHn Avatar answered Oct 03 '22 12:10

0xAliHn