299

Getting below error message while issuing :

sudo apt-get update

Get:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease [95.8 kB]
Ign:2 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 InRelease                                                                                                            
Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                                                         
Hit:4 http://ppa.launchpad.net/canonical-x/vulkan/ubuntu xenial InRelease                                                                                                
Hit:5 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 Release                                                                            
Hit:6 http://us.archive.ubuntu.com/ubuntu xenial-security InRelease                                                  
Ign:7 http://dl.google.com/linux/talkplugin/deb stable InRelease                                                     
Hit:8 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease                                                   
Ign:9 http://linux.dropbox.com/ubuntu wily InRelease                                           
Hit:10 http://ppa.launchpad.net/numix/ppa/ubuntu xenial InRelease                              
Get:12 http://dl.google.com/linux/chrome/deb stable Release [782 B]      
Hit:13 http://dl.google.com/linux/talkplugin/deb stable Release                  
Ign:14 https://apt.dockerproject.org/repo ubuntu-wily InRelease          
Hit:15 https://apt.dockerproject.org/repo ubuntu-wily Release            
Get:16 http://dl.google.com/linux/chrome/deb stable Release.gpg [181 B]  
Hit:17 http://linux.dropbox.com/ubuntu wily Release                                  
Get:20 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,191 B]
Fetched 98.0 kB in 0s (118 kB/s)                                 
Reading package lists... Done
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://dl.google.com/linux/chrome/deb stable InRelease' doesn't support architecture 'i386'

This cuts across various releases of ubuntu

Also seeing a similar glitch after enabling Ubuntu pro on my 22.04 ... now shows

sudo apt-get update
... 
Reading package lists... Done
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://esm.ubuntu.com/realtime/ubuntu jammy InRelease' doesn't support architecture 'i386'
Scott Stensland
  • 14,755
  • 10
  • 55
  • 73
  • 8
    @Pilot6 (and others who voted for this question being off-topic): This is not specific to a particular Ubuntu version. It affects all users of Google Chrome on Ubuntu who have the Chrome repository enabled. – Gunnar Hjalmarsson Mar 05 '16 at 03:43
  • Chrome repository? – guntbert Mar 06 '16 at 18:45
  • @guntbert: I referred to Google's repository from where the updates are fetched. – Gunnar Hjalmarsson Mar 06 '16 at 20:59
  • 3
    @GunnarHjalmarsson what's the point of re-opening, since it's a dupe of http://askubuntu.com/questions/724093/no-more-updates-for-google-chrome-apt-get-update-error anyway? – muru Mar 06 '16 at 21:14
  • @muru: Wasn't aware of that extensive answer to the other question. But then this is a duplicate, and not off-topic. OTOH, I guess it's useful to keep a question with the wording of the error message in the title, expecially since it shows up also on 64 bits installs. – Gunnar Hjalmarsson Mar 07 '16 at 00:18
  • 5
    I can't see, why this should be a duplicate of the mentioned question. The source of the problem is the same, but the context is different (64 vs 32 bit). – Murmel Mar 09 '16 at 13:35
  • @muru: Pasting the error message into Google just brought me here, and since I've already up-voted it, it's apparently not the first time. Whatever technicalities people may bring up about the validity of this question, it's obviously useful for many people… 194 and counting, at this point. – Michael Scheper Sep 16 '20 at 16:13
  • @MichaelScheper that is irrelevant, since you would have gotten redirected to the dupe otherwise. – muru Sep 16 '20 at 16:28
  • Also see: https://stackoverflow.com/questions/61523447/skipping-acquire-of-configured-file-main-binary-i386-packages – Gwyneth Llewelyn Mar 23 '22 at 17:46
  • For what it's worth this applies to more than just Chrome. I had the same issue with the repository for cloudflared. – devius Mar 05 '23 at 12:14

9 Answers9

485

I tracked down offending repo (any for Google chrome in this dir)

cd /etc/apt/sources.list.d
grep chrome * | grep -v amd64

or more generally

grep -r google  /etc/apt | grep -v amd64 

Now do same as below for each repo file which matches above

cat /etc/apt/sources.list.d/google-chrome-unstable.list

### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb http://dl.google.com/linux/chrome/deb/ stable main

SOLUTION : limit to just 64 bit by introducing the [arch=amd64]

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

similar solution to fixing bug when upgrading to Ubuntu pro

cat /etc/apt/sources.list.d/ubuntu-realtime-kernel.list  
#  original bad ... comment out next line
deb https://esm.ubuntu.com/realtime/ubuntu jammy main
#  fixed by adding [arch=amd64] to above line as per
deb [arch=amd64] https://esm.ubuntu.com/realtime/ubuntu jammy main

NOTE : If you are trying to apply this solution for another package which as a .list file containing a line similar to this :

deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared jammy main

The solution is to add the architecture flag inside the square brackets, separated from the other arguments with a space. Here is an example :

deb [arch=amd64 signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared jammy main

ROOT CAUSE : Google dropped support for 32-bit Chrome on Linux triggering an error when updating apt in 64-bit systems (with multi arch enabled) ... details here : http://www.omgubuntu.co.uk/2016/03/fix-failed-to-fetch-google-chrome-apt-error-ubuntu

To confirm you are using 64 bit ubuntu with multiarch enabled issue

dpkg --print-foreign-architectures

if it says

i386

then you have added 32 bit support, this will list your native arch ... issue

dpkg --print-architecture 

if you are native 64 you will see this output so do SOLUTION shown above

amd64

Here is the command to remove multi architecture ( only if you have no 32 bit applications )

sudo dpkg --remove-architecture i386
Scott Stensland
  • 14,755
  • 10
  • 55
  • 73
  • 11
    This answer works very well (thank you!), however the file that needs to be edited (in your example /etc/apt/sources.list.d/google-chrome-unstable.list) is automatically configured on a regular basis, so the fix is written over and needs to be added over and over again. Any suggestions to overcome this? – sebpardo Feb 07 '18 at 03:21
  • How to list `i386` architectures? – Eugen Konkov Nov 20 '21 at 10:03
  • 1
    I love the thoroughness of this answer. Good work. Thank you. – Max Jan 10 '22 at 14:24
  • 2
    @EugenKonkov dpkg --get-selections | grep 386 might help – Cie6ohpa May 09 '22 at 15:01
  • 2
    Cloudflared [https://pkg.cloudflare.com/index.html] introduces this issue on Ubuntu 22.04; love how well this was documented; thank you – avluis Nov 18 '22 at 11:05
  • I came here because I got the same error after installing brave-browser. Your solution worked. – odigity Mar 12 '23 at 02:15
  • 1
    This answer helped me fix what turned out to be the same issue for the Keybase package. I just made the same change in `/etc/apt/sources.list.d/keybase.list`, adding `[arch=amd64]` and that fixed the issue. _(I also applied the more permanent fix in Eric Mintz' solution - see my comment there.)_ – Dave Yarwood Aug 07 '23 at 00:22
43

(this solution is for Ubuntu Bionic Beaver)
First, shame on Google for letting this issue linger so long!!

Here's how to fix it:
As already mentioned above, editing files in /etc/apt/sources.list.d seems to work... but only temporarily. The next day, the problem is back.

Here's why:

The file /etc/cron.daily/google-earth-pro runs daily and overwrites what you have in /etc/apt/sources.list.d/google-earth-pro.list.

To fix it once and for all, edit /etc/cron.daily/google-earth-pro.
Find this line:

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

...and change it to:

REPOCONFIG="deb [arch=amd64] http://dl.google.com/linux/earth/deb/ stable main"
zx485
  • 2,249
  • 11
  • 24
  • 34
Eric Mintz
  • 2,518
  • 11
  • 24
  • 1
    For immediate change for Google Earth, it might be worth editing the files `google-earth-pro.list` and `google-earth-pro.list.save`. – Jaydin Dec 17 '18 at 04:12
  • The line to change would be at LINE 24 – Andor Kiss Jan 29 '19 at 11:53
  • Thank you. `[arch=amd64]` solved my problem with virtualbox 6.0 – Simon Fontana Oscarsson Feb 23 '19 at 21:58
  • 1
    Interesting, I did this AND the sources file still gets re-written. – Andor Kiss Mar 24 '19 at 14:39
  • @AndorKiss Yes, that's what this cron job is doing. That's why this answer is here. – Colin 't Hart Apr 30 '19 at 08:58
  • 1
    `/etc/apt/sources.list.d/google.list` covers `google-chrome-stable`, `google-chrome-beta` and `google-chrome-unstable`. `cat /opt/google/chrome-beta/cron/google-chrome-beta | grep "REPOCONFIG="`. `cat /opt/google/chrome-unstable/cron/google-chrome-unstable | grep "REPOCONFIG="`. All three point to `stable`. – noobninja Jan 18 '20 at 17:50
  • This answer helped me fix what turned out to be the same issue for the Keybase package. I edited `/etc/cron.daily/keybase` and edited the lines that include `REPOCONFIG` and `SSLREPOCONFIG` to include `[arch=amd64]`. _(Based on comments in that file, it looks like the Keybase team copied the Google Chrome package file that had this same issue and modified it.)_ – Dave Yarwood Aug 07 '23 at 00:23
26

Changing

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

to

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

in each of

  • /etc/apt/sources.list.d/google-musicmanager.list
  • /etc/apt/sources.list.d/google-musicmanager.list.save
  • /etc/apt/sources.list.d/google-musicmanager.list.distUpgrade

seems to fix the issue for Google Music Manager for Play Music too. Not sure if it will revert these changes at some point as the files are automatically configured.

David Foerster
  • 35,754
  • 55
  • 92
  • 145
Mr Angry
  • 361
  • 3
  • 3
6

Although Google has fixed this issue for Chrome, it still appears for e.g. Google Earth.

Adding [arch=amd64] fixes the issue, but it needs to be added over and over again.

After making the file immutable as proposed by a webupd8 article and running into issues because of that, my current solution is to add a cronjob to apply the fix automatically once every hour:

~$ sudo crontab -e

0 * * * * sed -i 's/^deb http/deb [arch=amd64] http/' /etc/apt/sources.list.d/google-earth.list

(Replace google-earth.list if necessary).

pLumo
  • 26,204
  • 2
  • 57
  • 87
  • Out of curiosity what keeps changing this file? In my experience, apt sources files don't get changed by themselves – Jonathan Jul 04 '18 at 15:20
  • 1
    [Sergio Rus](http://www.webupd8.org/2016/03/fix-failed-to-fetch-google-chrome_3.html#comment-2561557082) reckons that Google eventually fixed it for Chrome such that your one-time change would be preserved over updates. – Martin Dorey Jul 11 '18 at 23:25
5

Note that the above answers give accurate solutions for the ONE-LINE-STYLE format .list files; however, the verbose DEB822-STYLE FORMAT needs to use the full Architectures option instead of the abbreviated arch option to restrict the repo's packages to your desired architecture.

For example:

# /etc/apt/sources.list.d/apache-arrow.sources


Types: deb deb-src
URIs: https://apache.jfrog.io/artifactory/arrow/ubuntu/
Suites: focal
Components: main
Signed-By: /usr/share/keyrings/apache-arrow-apt-source.gpg
Architectures: amd64

Details on this option and others can be found with man sources.list

David Bodow
  • 151
  • 1
  • 3
4

Though this question has been marked solved, I was unable to solve this issue with any of the above answers. I used an another method. Go to 'software & updates' > ubuntu software > download from > select best server. Now wait for some time for the system to find it out. Once this gets done, try your command again. This worked for me.

4

I add my 2 cent. Sorry If I have a Debian 10 and not an Ubuntu, but my answer is in-topic.

I had the same problem due to mariadb repo. It was added to sources.list as

deb [arch=amd64,i386,ppc64el] http://ftp.nluug.nl/db/mariadb/repo/10.3/debian buster main

I simply removed i386 and ppc64el

deb [arch=amd64] http://ftp.nluug.nl/db/mariadb/repo/10.3/debian buster main
realtebo
  • 399
  • 9
  • 23
2

Even if this question is marked solved, for me, on Ubuntu 18.04, changed a line in /etc/apt/sources.list from deb http://dl.google.com/linux/chrome/deb/ stable main to deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main.

There was no file named /etc/apt/sources.list.d/google-chrome-unstable.list. Making the same changes in /etc/apt/sources.list.d/google-chrome.list gave warnings saying that target package is configured multiple times. (in sources.list and google-chrome.list)

Shubhzgang
  • 239
  • 2
  • 9
2

Change my source list

deb https://download.mono-project.com/repo/ubuntu stable-focal main

to

deb [arch=amd64] https://download.mono-project.com/repo/ubuntu stable-focal main