![在启用多种架构的情况下更新 Aptitude 时出现警告和错误](https://linux22.com/image/990809/%E5%9C%A8%E5%90%AF%E7%94%A8%E5%A4%9A%E7%A7%8D%E6%9E%B6%E6%9E%84%E7%9A%84%E6%83%85%E5%86%B5%E4%B8%8B%E6%9B%B4%E6%96%B0%20Aptitude%20%E6%97%B6%E5%87%BA%E7%8E%B0%E8%AD%A6%E5%91%8A%E5%92%8C%E9%94%99%E8%AF%AF.png)
我有一台安装了 Ubuntu 的 Odroid XU3。我最近安装了 qemu-user-static,用于运行 i386 二进制文件。
此过程的一部分是将我可以从中下载 i386 二进制文件的存储库的 URL 添加到 Apt。完成此操作后,当我使用命令“能力更新“:
W: Failed to fetch http://ports.ubuntu.com/dists/wily-updates/main/binary-i386/Packages: 404 Not Found [IP: 91.189.88.151 80]
W: Failed to fetch http://en.archive.ubuntu.com/ubuntu/dists/wily-proposed/restricted/binary-armhf/Packages: 404 Not Found [IP: 91.189.88.161 80]
W: Failed to fetch http://en.archive.ubuntu.com/ubuntu/dists/wily-updates/universe/binary-armhf/Packages: 404 Not Found [IP: 91.189.88.161 80]
W: Failed to fetch http://en.archive.ubuntu.com/ubuntu/dists/wily-updates/multiverse/binary-armhf/Packages: 404 Not Found [IP: 91.189.88.161 80]
W: Failed to fetch http://en.archive.ubuntu.com/ubuntu/dists/wily-updates/main/binary-armhf/Packages: 404 Not Found [IP: 91.189.88.161 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: Couldn't rebuild package cache
端口.ubuntu.com我从这里下载 ARM 二进制文件档案库是我获取 i386 的地方。我假设错误是由 Aptitude 尝试从以下位置检索 i386 二进制文件引起的端口.ubuntu.com对于 ARM 二进制文件而言,反之亦然。
有没有办法告诉 Aptitude 只从端口.ubuntu.com和 i386 仅限档案库?
答案1
我在这里找到了我自己的问题的答案:https://wiki.debian.org/Multiarch/HOWTO#Setting_up_apt_sources
总而言之,您需要/etc/apt/sources.list
使用文本编辑器打开文件,然后在每行arch=<architecture>
之间添加deb
和 URL。这是页面上提供的示例:
deb [arch=amd64,i386] http://uk.archive.ubuntu.com/ubuntu/ quantal main universe
deb [arch=armel,armhf] http://ports.ubuntu.com/ubuntu-ports quantal main universe