跳过下载配置文件 'main/binary-i386/Packages',因为仓库 'xxx' 不支持架构 'i386'。

在发出以下命令时收到以下错误消息:
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'

这在不同版本的Ubuntu中都存在

启用Ubuntu专业版后,我也遇到了类似的问题... 现在显示为

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'

8@Pilot6(以及其他投票认为此问题不适合的人):这个问题并不特定于某个特定的Ubuntu版本。它影响所有在Ubuntu上启用了Chrome软件源的Google Chrome用户。 - Gunnar Hjalmarsson
Chrome仓库? - guntbert
@guntbert:我提到了从谷歌的代码库中获取更新的地方。 - Gunnar Hjalmarsson
3@GunnarHjalmarsson 重新开放的意义何在,既然它是 http://askubuntu.com/questions/724093/no-more-updates-for-google-chrome-apt-get-update-error 的重复? - muru
@muru:对于其他问题的详细回答我并不知情。但是这个问题是重复的,而不是离题的。另一方面,我想保留一个带有错误信息标题的问题可能会很有用,尤其是因为它也出现在64位安装中。 - Gunnar Hjalmarsson
5我不明白为什么这应该被视为与提到的问题重复。问题的根源是相同的,但上下文却不同(64位与32位)。 - Murmel
@muru:将错误信息粘贴到谷歌上只会把我带到这里,而且由于我已经点赞了,显然这不是第一次了。无论人们对这个问题的有效性提出什么技术性的争议,很明显它对许多人来说都是有用的...目前已经有194个人这样认为。 - Michael Scheper
@MichaelScheper 这是无关紧要的,因为否则你会被重定向到重复页面。 - muru
另请参阅:https://stackoverflow.com/questions/61523447/skipping-acquire-of-configured-file-main-binary-i386-packages - Gwyneth Llewelyn
就算这只是个小问题,它不仅适用于Chrome。我在cloudflared的存储库上也遇到了同样的问题。 - devius
9个回答

我找到了有问题的存储库(任何一个在这个目录中适用于Google Chrome的)。
cd /etc/apt/sources.list.d
grep chrome * | grep -v amd64

更常见的是
grep -r google  /etc/apt | grep -v amd64 

现在对于与上述相匹配的每个仓库文件都执行以下操作。
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

解决方案:通过引入[arch=amd64]将限制仅为64位。
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main

类似的解决方案,适用于升级到Ubuntu专业版时修复bug。
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

注意:如果您尝试将此解决方案应用于另一个包含类似以下行的 .list 文件的软件包:
deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared jammy main

解决方案是在方括号内添加架构标志,与其他参数用空格分隔。以下是一个示例:
deb [arch=amd64 signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared jammy main

根本原因:Google在Linux上停止支持32位的Chrome,导致64位系统(启用了多架构)在更新apt时出现错误...详细信息请参考:http://www.omgubuntu.co.uk/2016/03/fix-failed-to-fetch-google-chrome-apt-error-ubuntu 为确认您是否遇到了64位Ubuntu启用了多架构的问题。
dpkg --print-foreign-architectures

如果它说
i386

你已经添加了32位支持,这将列出你的本机架构...问题。
dpkg --print-architecture 

如果您是本地的64位系统,您将看到此输出,所以请按照上面显示的解决方案操作。
amd64

这是删除多架构的命令(仅当您没有32位应用程序时)。
sudo dpkg --remove-architecture i386

11这个答案非常好(谢谢!),然而需要编辑的文件(在你的示例中为/etc/apt/sources.list.d/google-chrome-unstable.list)会定期自动配置,因此修复的内容会被覆盖掉,需要一次又一次地添加。有没有克服这个问题的建议? - sebpardo
如何列出i386架构? - Eugen Konkov
1我喜欢这个回答的全面性。干得好。谢谢你。 - Max
2@EugenKonkov 可以尝试使用 dpkg --get-selections | grep 386 命令。 - Cie6ohpa
2Cloudflared [https://pkg.cloudflare.com/index.html] 在 Ubuntu 22.04 上出现了这个问题;喜欢文档的详细记录;谢谢 - avluis
我来这里是因为在安装勇敢浏览器后遇到了同样的错误。你的解决方案有效。 - odigity
1这个答案帮助我解决了Keybase软件包的相同问题。我只是在/etc/apt/sources.list.d/keybase.list中做了同样的更改,添加了[arch=amd64],问题就解决了。 (我还按照Eric Mintz的解决方案进行了更持久的修复-请查看我的评论。) - Dave Yarwood
对我来说还是不起作用,说明很好,但是... - undefined
/etc/apt/sources.list.d ❯❯❯ sudo dpkg --remove-architecture i386 Alias tip: _ dpkg --remove-architecture i386 dpkg: error: cannot remove architecture 'i386' currently in use by the database - undefined

(此解决方案适用于Ubuntu Bionic Beaver)
首先,对谷歌让这个问题困扰了这么长时间感到羞耻!!

以下是如何修复的方法:
如上所述,编辑 /etc/apt/sources.list.d 中的文件似乎有效...但只是暂时性的。第二天,问题又会出现。

原因如下:

文件 /etc/cron.daily/google-earth-pro 每天运行,并覆盖 /etc/apt/sources.list.d/google-earth-pro.list 中的内容。

要彻底修复它,请编辑 /etc/cron.daily/google-earth-pro
找到这一行:

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

...并将其更改为:

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

1еҜ№дәҺз«ӢеҚіжӣҙж”№Google EarthжқҘиҜҙпјҢзј–иҫ‘google-earth-pro.listе’Ңgoogle-earth-pro.list.saveж–Ү件еҸҜиғҪжҳҜеҖјеҫ—зҡ„гҖӮ - Jaydin
需要更改的行数是第24行。 - Andor Kiss
谢谢。[arch=amd64]解决了我在VirtualBox 6.0上的问题。 - Simon Fontana Oscarsson
1有趣,我做了这个,但源文件仍然被重写。 - Andor Kiss
@AndorKiss 是的,这就是这个cron job正在做的事情。这就是为什么有这个答案在这里。 - Colin 't Hart
1/etc/apt/sources.list.d/google.list 包含了 google-chrome-stablegoogle-chrome-betagoogle-chrome-unstablecat /opt/google/chrome-beta/cron/google-chrome-beta | grep "REPOCONFIG="cat /opt/google/chrome-unstable/cron/google-chrome-unstable | grep "REPOCONFIG="。这三个都指向 stable - noobninja
这个答案帮助我修复了 Keybase 软件包的相同问题。我编辑了 /etc/cron.daily/keybase 文件,并修改了包含 REPOCONFIGSSLREPOCONFIG 的行,添加了 [arch=amd64]。(根据该文件中的注释,看起来 Keybase 团队复制了具有相同问题的 Google Chrome 软件包文件并对其进行了修改。) - Dave Yarwood

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

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

每一个

  • /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
似乎也解决了Google音乐管理器对Play Music的问题。不确定文件是否会自动配置,因此这些更改是否会在某个时候恢复。

3对我来说,需要更改的文件是 /etc/apt/sources.list.d/google.list - catch23
1

此文件已自动配置

您可以注释掉此条目,但其他任何修改可能会丢失。

- Ferroao

虽然Google已经为Chrome修复了这个问题,但是对于例如Google Earth等仍然存在。
添加[arch=amd64]可以解决这个问题,但需要一遍又一遍地添加。
在根据webupd8 article建议使文件不变后,我遇到了issues而产生了问题。我的当前解决方案是添加一个cron任务,每小时自动应用修复:
~$ sudo crontab -e

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

(如有需要,替换google-earth.list)。

出于好奇,是什么导致这个文件不断变化?根据我的经验,apt源文件不会自己改变。 - Jonathan
1Sergio Rus认为,Google最终修复了Chrome的问题,使得您的一次性更改可以在更新后保留。 - Martin Dorey

请注意,上述答案提供了准确的解决方案,适用于“ONE-LINE-STYLE”格式的“.list”文件;然而,冗长的“DEB822-STYLE FORMAT”需要使用完整的“Architectures”选项,而不是缩写的“arch”选项,以限制存储库的软件包到您所需的架构。
例如:
# /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

您可以在 man sources.list 中找到关于此选项以及其他选项的详细信息。

尽管这个问题已经被标记为已解决,但是我无法通过以上任何答案解决这个问题。我使用了另一种方法。进入“软件和更新”>“Ubuntu软件”>“下载自”>选择最佳服务器。现在等待系统找到它。一旦完成,再次尝试您的命令。这对我起作用了。

这对我也起作用了!太棒了! - musicformellons
很高兴知道 :) - Ruchit Dalwadi

我来发表一下我的意见。很抱歉,我用的是Debian 10而不是Ubuntu,但是我的回答是相关的。
我之前也遇到过同样的问题,是由于mariadb仓库引起的。它被添加到了sources.list中作为
deb [arch=amd64,i386,ppc64el] http://ftp.nluug.nl/db/mariadb/repo/10.3/debian buster main

我只是移除了i386ppc64el
deb [arch=amd64] http://ftp.nluug.nl/db/mariadb/repo/10.3/debian buster main

即使这个问题被标记为已解决,在我的Ubuntu 18.04上,我将/etc/apt/sources.list中的一行改为deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main。
没有名为/etc/apt/sources.list.d/google-chrome-unstable.list的文件。 在/etc/apt/sources.list.d/google-chrome.list中进行相同的更改会收到警告,提示目标软件包配置了多次(在sources.list和google-chrome.list中)。

更改我的源列表
deb https://download.mono-project.com/repo/ubuntu stable-focal main

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