Sco*_*and 226 package-management apt multiarch
发出时收到以下错误消息:
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'
Run Code Online (Sandbox Code Playgroud)
这跨越了 ubuntu 的各种版本
Sco*_*and 379
我追踪了违规的回购(此目录中的任何谷歌浏览器)
cd /etc/apt/sources.list.d
grep chrome * | grep -v amd64
Run Code Online (Sandbox Code Playgroud)
或更一般地
grep -r google /etc/apt | grep -v amd64
Run Code Online (Sandbox Code Playgroud)
现在对与上面匹配的每个 repo 文件执行以下相同的操作
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
Run Code Online (Sandbox Code Playgroud)
解决方案:通过引入 [arch=amd64] 限制为 64 位
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
Run Code Online (Sandbox Code Playgroud)
根本原因:谷歌在 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
Run Code Online (Sandbox Code Playgroud)
如果它说
i386
Run Code Online (Sandbox Code Playgroud)
那么你已经添加了 32 位支持,这将列出你的原生 arch ... 问题
dpkg --print-architecture
Run Code Online (Sandbox Code Playgroud)
如果你是本地 64 你会看到这个输出所以上面显示的解决方案
amd64
Run Code Online (Sandbox Code Playgroud)
这是删除多架构的命令(仅当您没有 32 位应用程序时)
sudo dpkg --remove-architecture i386
Run Code Online (Sandbox Code Playgroud)
Eri*_*ntz 37
(此解决方案适用于 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"
Run Code Online (Sandbox Code Playgroud)
...并将其更改为:
REPOCONFIG="deb [arch=amd64] http://dl.google.com/linux/earth/deb/ stable main"
Run Code Online (Sandbox Code Playgroud)
小智 24
改变
deb http://dl.google.com/linux/chrome/deb/ stable main
Run Code Online (Sandbox Code Playgroud)
到
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
Run Code Online (Sandbox Code Playgroud)
在每个
/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 Music Manager for Play Music 的问题。不确定它是否会在某个时候恢复这些更改,因为文件是自动配置的。
尽管谷歌已经为Chrome修复了这个问题,但它仍然会出现在 谷歌地球上。
添加可以[arch=amd64]
解决问题,但需要一遍又一遍地添加。
使文件不可变的提出了通过后webupd8文章并运行到问题,正因为如此,我目前的解决办法是增加一个cronjob自动应用修复每小时一次:
~$ sudo crontab -e
0 * * * * sed -i 's/^deb http/deb [arch=amd64] http/' /etc/apt/sources.list.d/google-earth.list
Run Code Online (Sandbox Code Playgroud)
(google-earth.list
必要时更换)。
小智 6
请注意,上述答案给出了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
Run Code Online (Sandbox Code Playgroud)
有关此选项和其他选项的详细信息可以通过man sources.list
归档时间: |
|
查看次数: |
205368 次 |
最近记录: |