apt-get update 使用 binary-x64 而不是 binary-amd64 并失败

apt-get update 使用 binary-x64 而不是 binary-amd64 并失败

我在更新软件包列表时收到这些错误消息。也许你可以帮助我:

sudo apt-get update
Hit http://repo.steampowered.com precise InRelease
Ign http://us.archive.ubuntu.com trusty InRelease
Hit http://repo.steampowered.com precise/steam Sources
Ign http://us.archive.ubuntu.com trusty-security InRelease
Hit http://repo.steampowered.com precise/steam amd64 Packages
Hit http://repo.steampowered.com precise/steam i386 Packages
Ign http://us.archive.ubuntu.com trusty-updates InRelease
Hit http://us.archive.ubuntu.com trusty Release.gpg
Get:1 http://us.archive.ubuntu.com trusty-security Release.gpg [933 B]
Get:2 http://us.archive.ubuntu.com trusty-updates Release.gpg [933 B]
Hit http://us.archive.ubuntu.com trusty Release
Get:3 http://us.archive.ubuntu.com trusty-security Release [58.5 kB]
Get:4 http://us.archive.ubuntu.com trusty-updates Release [58.5 kB]
Hit http://us.archive.ubuntu.com trusty/main Sources
Hit http://us.archive.ubuntu.com trusty/restricted Sources
Hit http://us.archive.ubuntu.com trusty/universe Sources
Hit http://us.archive.ubuntu.com trusty/multiverse Sources
Hit http://us.archive.ubuntu.com trusty/main amd64 Packages
Hit http://us.archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://us.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://us.archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com trusty/main i386 Packages
Hit http://us.archive.ubuntu.com trusty/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty/universe i386 Packages
Hit http://us.archive.ubuntu.com trusty/multiverse i386 Packages
Get:5 http://us.archive.ubuntu.com trusty-security/main Sources [14.7 kB]
Get:6 http://us.archive.ubuntu.com trusty-security/restricted Sources [14 B]
Get:7 http://us.archive.ubuntu.com trusty-security/universe Sources [4,212 B]
Ign http://repo.steampowered.com precise/steam Translation-en_US
Get:8 http://us.archive.ubuntu.com trusty-security/multiverse Sources [687 B]
Ign http://repo.steampowered.com precise/steam Translation-en
Get:9 http://us.archive.ubuntu.com trusty-security/main amd64 Packages [47.0 kB]
Get:10 http://us.archive.ubuntu.com trusty-security/restricted amd64 Packages [14 B]
Get:11 http://us.archive.ubuntu.com trusty-security/universe amd64 Packages [17.7 kB]
Get:12 http://us.archive.ubuntu.com trusty-security/multiverse amd64 Packages [1,154 B]
Get:13 http://us.archive.ubuntu.com trusty-security/main i386 Packages [45.1 kB]
Get:14 http://us.archive.ubuntu.com trusty-security/restricted i386 Packages [14 B]
Get:15 http://us.archive.ubuntu.com trusty-security/universe i386 Packages [17.7 kB]
Get:16 http://us.archive.ubuntu.com trusty-security/multiverse i386 Packages [1,404 B]
Get:17 http://us.archive.ubuntu.com trusty-updates/main Sources [35.9 kB]
Get:18 http://us.archive.ubuntu.com trusty-updates/restricted Sources [14 B]
Get:19 http://us.archive.ubuntu.com trusty-updates/universe Sources [23.8 kB]
Get:20 http://us.archive.ubuntu.com trusty-updates/multiverse Sources [2,234 B]
Get:21 http://us.archive.ubuntu.com trusty-updates/main amd64 Packages [83.4 kB]
Get:22 http://us.archive.ubuntu.com trusty-updates/restricted amd64 Packages [14 B]
Get:23 http://us.archive.ubuntu.com trusty-updates/universe amd64 Packages [64.3 kB]
Get:24 http://us.archive.ubuntu.com trusty-updates/multiverse amd64 Packages [7,089 B]
Get:25 http://us.archive.ubuntu.com trusty-updates/main i386 Packages [81.6 kB]
Get:26 http://us.archive.ubuntu.com trusty-updates/restricted i386 Packages [14 B]
Get:27 http://us.archive.ubuntu.com trusty-updates/universe i386 Packages [64.5 kB]
Get:28 http://us.archive.ubuntu.com trusty-updates/multiverse i386 Packages [7,273 B]
Fetched 639 kB in 3s (192 kB/s)
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty/Release  Unable to find expected entry 'main/binary-x64/Packages' in Release file (Wrong sources.list entry or malformed file)

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-security/Release  Unable to find expected entry 'main/binary-x64/Packages' in Release file (Wrong sources.list entry or malformed file)

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/Release  Unable to find expected entry 'main/binary-x64/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.

我使用旧的 sources.list 和在其他类似问题中提到的 repo 构建站点上构建的 sources.list 来获取它们。请参阅下面我当前的 sources.list。

###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse

查看失败的 URL 时,我注意到这些 URL 列出的是 main/binary-amd64,而不是 binary-x64。看来我可以通过在每个源行中输入 deb=amd64 来解决这个问题,但我怀疑这不是问题的根源。uname
-a 返回:

Linux Knights 3.13.0-24-generic #47-Ubuntu SMP 2014 年 5 月 2 日星期五 23:30:00 UTC x86_64 x86_64 x86_64 GNU/Linux 以防万一我确实从 13.10 升级了它。

dpkg --print-foreign-architectures 的输出:

i386
x64

答案1

这个问题很容易解决。只需输入:

sudo dpkg --remove-architecture x64

现在,有人在那里添加了该架构。这不是有效的架构。唯一有效的架构是:

  • amd64
  • 臂丛
  • i386
  • 电脑
  • ppc64el

要添加其中任何一个,只需使用:

sudo dpkg --add-architecture <arch>

其中 arch 是上述之一。

相关内容