9

Running sudo apt update, I got this error:

W: Failed to fetch http://dl.google.com/linux/earth/deb/dists/stable/Release  Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)

How do I fix this? I am running Ubuntu 14.04 64-bit.

Update: I followed my answer, but the error returned today. The file /etc/apt/sources.list.d/google-earth.list is back to the way it was, and I just noticed it has these two lines:

### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.

So it seems the file was overwritten, meaning the current answer is not a permanent fix, and neither is the duplicate.

Update 2: I've decided to uninstall Google Earth and delete its .list file. I never use it anyway. If anyone is having the same issue, let me know and I'll help you out.

Update 3: muru mentioned in the comments that there is a cron file, /etc/cron.daily/google-earth. I read through it and found it appends this to the .list file:

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

So maybe editing this part of the cron job, or disabling it outright, would solve the problem.

wjandrea
  • 14,504

2 Answers2

8

I found the answer on this similar question: No more updates for Google Chrome 32-bit

I ran sudo nano /etc/apt/sources.list.d/google-earth.list, and changed this line:

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

to this:

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

Then sudo apt update succeeded.

wjandrea
  • 14,504
0

Addressing this part of the question:

So it seems the file was overwritten, meaning the current answer is not a permanent fix, and neither is the duplicate.

I have this problem with both google 'earth' and 'chrome' (of the corrected source lists getting overwritten). To solve it, I made a copy of the correct source lists and saved them off, then I made a script fix-google that copies the saved versions over the ones in /etc/apt. Since I always do updates with aptitude, I changed the script I use to start aptitude to run fix-google before it starts aptitude. Kludgy but it works. I found this problem super annoying