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.

4
  • 4
    Do you have a /etc/cron.daily/google-earth file?
    – muru
    Commented Feb 8, 2018 at 7:39
  • 2
    @muru Yes, and it has this line which gets appended to the .list file: REPOCONFIG="deb http://dl.google.com/linux/earth/deb/ stable main"
    – wjandrea
    Commented Feb 8, 2018 at 19:45
  • 1
    Possible duplicate of Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'xxx' doesn't support architecture 'i386' - different error, but similar issue
    – wjandrea
    Commented Nov 15, 2018 at 19:07
  • 1
    I found that editing the cron script seems to do the trick. Very easy to demonstrate: simply execute that script, and then observe the contents of /etc/apt/sources.list.d/google-earth.list. Thanks for discovering/pointing out that this cron script existed - I didn't even consider that this is how the file (google-earth.list) was getting overwritten. Commented Jun 26, 2019 at 13:39

2 Answers 2

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.

4
  • 1
    Note that in my latest version it is Google Earth Pro so when I have problems I run sudo sed -i -e 's/deb http/deb [arch=amd64] http/' "/etc/apt/sources.list.d/google-earth-pro.list"
    – Dennis
    Commented May 1, 2019 at 16:22
  • @Dennis Take a look at edit 3 in my question. You probably have a cron job at /etc/cron.daily/google-earth-pro that you could edit.
    – wjandrea
    Commented May 1, 2019 at 17:05
  • 1
    Good point. I was mainly commenting on the fact that the name changed and didn't think so much about the answer itself. I wonder though are there benefits to the cron job that might be missed by doing so? I don't understand it all but it looks like a lot of error checking and fixing.
    – Dennis
    Commented May 1, 2019 at 19:26
  • @Dennis Right, the name is different. About the cron job, I meant to say you could edit it instead of disabling it. I just clarified that bit in the question.
    – wjandrea
    Commented May 1, 2019 at 19:49
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .