我需要在 Raspberry Pi(armhf
端口,ARMv7)上使用 QEMU 运行一些 x86 二进制文件,以使打印机与佳能糟糕的二进制 UFRII 驱动程序一起工作。如何仅安装其 x86 依赖项armhf
(而不是如何运行它们)?
我可以安装 x86 二进制文件:
root@raspberry-pi:~# dpkg --force-architecture -i /tmp/cnrdrvcups-ufr2-uk_5.10-1_i386.deb
但随后apt
一直抱怨缺少它的依赖项。我可能实际上需要它们来运行 UFRII 转换器——所以我真的很想通过apt
.
我可以添加i386
架构,但apt-get update
无法下载一些资源,可能是因为armhf
它位于 ports.ubuntu.com 上,而 x86 包位于主镜像上。(我之前曾经在amd64上成功安装过i386包。)
root@raspberry-pi:~# dpkg --add-architecture i386
root@raspberry-pi:~# apt-get update
Hit:1 http://ports.ubuntu.com/ubuntu-ports bionic InRelease
Get:2 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease [88.7 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease [74.6 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease [88.7 kB]
Ign:5 http://ports.ubuntu.com/ubuntu-ports bionic/main i386 Packages
Ign:6 http://ports.ubuntu.com/ubuntu-ports bionic/restricted i386 Packages
Ign:7 http://ports.ubuntu.com/ubuntu-ports bionic/universe i386 Packages
Ign:8 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse i386 Packages
Ign:5 http://ports.ubuntu.com/ubuntu-ports bionic/main i386 Packages
Ign:6 http://ports.ubuntu.com/ubuntu-ports bionic/restricted i386 Packages
Ign:7 http://ports.ubuntu.com/ubuntu-ports bionic/universe i386 Packages
Ign:8 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse i386 Packages
Ign:5 http://ports.ubuntu.com/ubuntu-ports bionic/main i386 Packages
Ign:6 http://ports.ubuntu.com/ubuntu-ports bionic/restricted i386 Packages
Ign:7 http://ports.ubuntu.com/ubuntu-ports bionic/universe i386 Packages
Ign:8 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse i386 Packages
Err:5 http://ports.ubuntu.com/ubuntu-ports bionic/main i386 Packages
404 Not Found [IP: 91.189.88.150 80]
Ign:6 http://ports.ubuntu.com/ubuntu-ports bionic/restricted i386 Packages
Ign:7 http://ports.ubuntu.com/ubuntu-ports bionic/universe i386 Packages
Ign:8 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse i386 Packages
Ign:9 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main i386 Packages
Ign:10 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted i386 Packages
Ign:11 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe i386 Packages
Ign:12 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse i386 Packages
Ign:9 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main i386 Packages
Ign:10 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted i386 Packages
Ign:11 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe i386 Packages
Ign:12 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse i386 Packages
Ign:9 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main i386 Packages
Ign:10 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted i386 Packages
Ign:11 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe i386 Packages
Ign:12 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse i386 Packages
Err:9 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main i386 Packages
404 Not Found [IP: 91.189.88.150 80]
Ign:10 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted i386 Packages
Ign:11 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe i386 Packages
Ign:12 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse i386 Packages
Ign:13 http://ports.ubuntu.com/ubuntu-ports bionic-backports/main i386 Packages
Ign:14 http://ports.ubuntu.com/ubuntu-ports bionic-backports/universe i386 Packages
Ign:13 http://ports.ubuntu.com/ubuntu-ports bionic-backports/main i386 Packages
Ign:14 http://ports.ubuntu.com/ubuntu-ports bionic-backports/universe i386 Packages
Ign:13 http://ports.ubuntu.com/ubuntu-ports bionic-backports/main i386 Packages
Ign:14 http://ports.ubuntu.com/ubuntu-ports bionic-backports/universe i386 Packages
Err:13 http://ports.ubuntu.com/ubuntu-ports bionic-backports/main i386 Packages
404 Not Found [IP: 91.189.88.150 80]
Ign:14 http://ports.ubuntu.com/ubuntu-ports bionic-backports/universe i386 Packages
Ign:15 http://ports.ubuntu.com/ubuntu-ports bionic-security/main i386 Packages
Ign:16 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted i386 Packages
Ign:17 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe i386 Packages
Ign:18 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse i386 Packages
Ign:15 http://ports.ubuntu.com/ubuntu-ports bionic-security/main i386 Packages
Ign:16 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted i386 Packages
Ign:17 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe i386 Packages
Ign:18 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse i386 Packages
Ign:15 http://ports.ubuntu.com/ubuntu-ports bionic-security/main i386 Packages
Ign:16 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted i386 Packages
Ign:17 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe i386 Packages
Ign:18 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse i386 Packages
Err:15 http://ports.ubuntu.com/ubuntu-ports bionic-security/main i386 Packages
404 Not Found [IP: 91.189.88.150 80]
Ign:16 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted i386 Packages
Ign:17 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe i386 Packages
Ign:18 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse i386 Packages
Fetched 252 kB in 2s (112 kB/s)
Reading package lists... Done
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic/main/binary-i386/Packages 404 Not Found [IP: 91.189.88.150 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/main/binary-i386/Packages 404 Not Found [IP: 91.189.88.150 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-backports/main/binary-i386/Packages 404 Not Found [IP: 91.189.88.150 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-security/main/binary-i386/Packages 404 Not Found [IP: 91.189.88.150 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
如何解决这个问题?我可能需要调整/添加一些东西,/etc/apt/sources.list
但不包含字符串i386
/ amd64
。所以我不知道从哪里开始。这是我当前的源文件:
## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## 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
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ports.ubuntu.com/ubuntu-ports bionic main restricted
# deb-src http://ports.ubuntu.com/ubuntu-ports bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://ports.ubuntu.com/ubuntu-ports bionic-updates main restricted
# deb-src http://ports.ubuntu.com/ubuntu-ports bionic-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ports.ubuntu.com/ubuntu-ports bionic universe
# deb-src http://ports.ubuntu.com/ubuntu-ports bionic universe
deb http://ports.ubuntu.com/ubuntu-ports bionic-updates universe
# deb-src http://ports.ubuntu.com/ubuntu-ports bionic-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ports.ubuntu.com/ubuntu-ports bionic multiverse
# deb-src http://ports.ubuntu.com/ubuntu-ports bionic multiverse
deb http://ports.ubuntu.com/ubuntu-ports bionic-updates multiverse
# deb-src http://ports.ubuntu.com/ubuntu-ports bionic-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ports.ubuntu.com/ubuntu-ports bionic-backports main restricted universe multiverse
# deb-src http://ports.ubuntu.com/ubuntu-ports bionic-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner
deb http://ports.ubuntu.com/ubuntu-ports bionic-security main restricted
# deb-src http://ports.ubuntu.com/ubuntu-ports bionic-security main restricted
deb http://ports.ubuntu.com/ubuntu-ports bionic-security universe
# deb-src http://ports.ubuntu.com/ubuntu-ports bionic-security universe
deb http://ports.ubuntu.com/ubuntu-ports bionic-security multiverse
# deb-src http://ports.ubuntu.com/ubuntu-ports bionic-security multiverse
我发现了如何在基于 ARM 的 Nexus 7 上的 Ubuntu 上安装 i386 软件包的问题?但是那里的人只是回答不可能在 ARM 上运行 x86。这是真的,但不是原始问题的正确答案。
更新:这是dpkg-deb
所需驱动程序包的输出,包括其第一级依赖项:
root@raspberry-pi:~# dpkg-deb --info /tmp/cnrdrvcups-ufr2-uk_5.10-1_i386.deb
new Debian package, version 2.0.
size 21503884 bytes: control archive=20743 bytes.
2058 bytes, 16 lines control
62636 bytes, 896 lines md5sums
339 bytes, 17 lines * postinst #!/bin/sh
90 bytes, 9 lines * postrm #!/bin/sh
Package: cnrdrvcups-ufr2-uk
Version: 5.10-1
Section: net
Priority: optional
Architecture: i386
Depends: cupsys | cups, libcups2 | libcupsys2 (>= 1.2.7)
Conflicts: cnrcupsiradv715zk, cnrcupsiradv615zk, cnrcupsiradv525zk, cnrcupsiradv7153zk, cnrcupsiradv6153zk, cnrcupsiradv5253zk, cnrcupsiradv85053zk, cnrcupsiradv85853zk, cnrcupsiradv65753zk, cnrcupsiradv65553zk, cnrcupsiradvc35203zk, cnrcupsiradvc35253zk, cnrcupsiradvc75803zk, cnrcupsiradvc75653zk, cnrcupsiradvc2563zk, cnrcupsiradvc55353zk, cnrcupsiradvc55503zk, cnrcupsiradv45453zk, cnrcupsiradv45253zk, cnrcupsiradvc4753zk, cnrcupswg7000zk, cnrcupswg7000zzk, cnrcupslbp853czk, cnrcupslbp852czk, cnrcupsd1600zk
Replaces: cnrdrvcups-ufr2-us, cnrdrvcups-lipslx, cnrcupsiradv715zk, cnrcupsiradv615zk, cnrcupsiradv525zk, cnrcupsiradv7153zk, cnrcupsiradv6153zk, cnrcupsiradv5253zk, cnrcupsiradv85053zk, cnrcupsiradv85853zk, cnrcupsiradv65753zk, cnrcupsiradv65553zk, cnrcupsiradvc35203zk, cnrcupsiradvc35253zk, cnrcupsiradvc75803zk, cnrcupsiradvc75653zk, cnrcupsiradvc2563zk, cnrcupsiradvc55353zk, cnrcupsiradvc55503zk, cnrcupsiradv45453zk, cnrcupsiradv45253zk, cnrcupsiradvc4753zk, cnrcupswg7000zk, cnrcupswg7000zzk, cnrcupslbp853czk, cnrcupslbp852czk, cnrcupsd1600zk
Provides: cnrcupsiradv715zk, cnrcupsiradv615zk, cnrcupsiradv525zk, cnrcupsiradv7153zk, cnrcupsiradv6153zk, cnrcupsiradv5253zk, cnrcupsiradv85053zk, cnrcupsiradv85853zk, cnrcupsiradv65753zk, cnrcupsiradv65553zk, cnrcupsiradvc35203zk, cnrcupsiradvc35253zk, cnrcupsiradvc75803zk, cnrcupsiradvc75653zk, cnrcupsiradvc2563zk, cnrcupsiradvc55353zk, cnrcupsiradvc55503zk, cnrcupsiradv45453zk, cnrcupsiradv45253zk, cnrcupsiradvc4753zk, cnrcupswg7000zk, cnrcupswg7000zzk, cnrcupslbp853czk, cnrcupslbp852czk, cnrcupsd1600zk
Installed-Size: 76096
Maintainer: CANON INC. <[email protected]>
Source: cnrdrvcups-lb
Description: Canon UFR2 Printer Driver for Linux
Canon UFR2 Printer Driver for Linux.
This UFR2 printer driver provides printing functions for Canon LBP/iR
printers operating under the CUPS (Common UNIX Printing System) environment.