1. 运行时fetch失败apt-get update。

1. 运行时fetch失败apt-get update。

我跟着Debian 的多架构指南能够安装libcholmod3:armhf。我运行了dpkg --add-architecture armhf,但现在如果我运行,sudo apt-get update我会收到一个错误:

$ sudo apt-get update
[...]
Reading package lists... Done
E: Failed to fetch http://europe-west1.gce.archive.ubuntu.com/ubuntu/dists/zesty/main/binary-armhf/Packages  404  Not Found [IP: 192.158.31.252 80]
E: Failed to fetch http://europe-west1.gce.archive.ubuntu.com/ubuntu/dists/zesty-updates/main/binary-armhf/Packages  404  Not Found [IP: 192.158.31.252 80]
E: Failed to fetch http://europe-west1.gce.archive.ubuntu.com/ubuntu/dists/zesty-backports/main/binary-armhf/Packages  404  Not Found [IP: 192.158.31.252 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/zesty-security/main/binary-armhf/Packages  404  Not Found [IP: 91.189.91.26 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

我懂了http://europe-west1.gce.archive.ubuntu.com/ubuntu/dists/zesty/main/缺少binary-armhf目录。在 Google Compute Engine 平台上安装 armhf 包的正确方法是什么?

答案1

有两个明显的问题:

1. 运行时fetch失败apt-get update

这实际上不是问题。正如消息所述,错误只是被忽略了。通过在 中的每一行添加“[arch=amd64]”,错误就会消失/etc/apt/sources.list,如下所述https://wiki.debian.org/Multiarch/HOWTO#Setting_up_apt_sources

2. 事实上,在那些获取失败消息的 URL 中似乎缺少 armhf。

我做了一个grep europe-west1 /etc -R/etc/apt/sources.list出现了。文件顶部是进行更改的几个选项:

## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
##     or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl

要在 amd64 Google Platform 云机器上为 armhf 设置 Multiarch,请使用上述选项之一添加以下源:

deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports zesty main universe

相关内容