原始问题

原始问题

原始问题

aarch64arm64Raspberry Pi 3 B+ (2017) 或 Pi 4 (使用这里的图像)。现在我想运行一些应用程序/库的 32 位 ( armhf/ armv7) 版本,但它们似乎不起作用。特别raspistill是来自 Raspbery Pi 用户区应用程序。

问题:如果可能的话,如何让raspistill(以及其他 32 位 Arm 二进制文件)在 64 位操作系统上运行?

我尝试过的:

采取的额外步骤

尝试安装 libc6:armh

使用树莓派源

我尝试使用 进行安装libc6:armhsudo apt-get install libc6:armhf并收到以下消息:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libc6:armhf : Depends: libgcc1:armhf but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

如果我随后尝试sudo apt-get install libc6:armhf libgcc1:armhf,我会得到一长串要安装的附加或新软件包、建议的软件包以及将删除的软件包。消息的最后一部分表明了这一点:

WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  apt adduser (due to apt) gpgv (due to apt) libapt-pkg5.0 (due to apt) libc6 (due to apt) libgcc1 (due to apt) libgnutls30 (due to apt) libseccomp2 (due to apt) libstdc++6 (due to apt) base-files base-passwd libdebconfclient0 (due to base-passwd) bash
  libtinfo6 (due to bash) debianutils (due to bash) bsdutils libsystemd0 (due to bsdutils) coreutils libacl1 (due to coreutils) libattr1 (due to coreutils) libselinux1 (due to coreutils) dash dpkg (due to dash) debconf (due to dash) diffutils libbz2-1.0 (due to dpkg)
  liblzma5 (due to dpkg) zlib1g (due to dpkg) tar (due to dpkg) e2fsprogs libblkid1 (due to e2fsprogs) libcom-err2 (due to e2fsprogs) libext2fs2 (due to e2fsprogs) libss2 (due to e2fsprogs) libuuid1 (due to e2fsprogs) fdisk libfdisk1 (due to fdisk)
  libmount1 (due to fdisk) libncursesw6 (due to fdisk) libsmartcols1 (due to fdisk) findutils grep libpcre3 (due to grep) gzip hostname init systemd-sysv (due to init) init-system-helpers (due to init) perl-base (due to init-system-helpers) libc-bin login
  libaudit1 (due to login) libpam0g (due to login) libpam-runtime (due to login) libpam-modules (due to login) mount util-linux (due to mount) ncurses-bin sed sysvinit-utils libcap-ng0 (due to util-linux) libudev1 (due to util-linux)
0 upgraded, 3 newly installed, 272 to remove and 1 not upgraded.
Need to get 2534 kB of archives.
After this operation, 718 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'

使用默认的 debian 源

我想我会暂时删除 raspbian 源/etc/apt/sources.list并仅使用默认的 debian 源,但armhf架构启用。示例来自sources.listdeb [arch=arm64,armhf] http://deb.debian.org/debian buster main contrib non-free.

现在,当我运行时sudo apt-get install libc6:armhf,我收到一条错误消息:package architecture (armhf) does not match system (arm64)。即使运行sudo apt-get updateupgradedist-upgradeclean后我也会收到此错误autoclean

Get:2 http://deb.debian.org/debian buster/main armhf libgcc1 armhf 1:8.3.0-6 [37.2 kB]
Get:3 http://deb.debian.org/debian buster/main armhf libc6 armhf 2.28-10 [2390 kB]
Get:4 http://deb.debian.org/debian buster/main armhf libunistring2 armhf 0.9.10-1 [368 kB]
Get:5 http://deb.debian.org/debian buster/main armhf libidn2-0 armhf 2.0.5-1+deb10u1 [74.3 kB]
Fetched 3060 kB in 2s (1430 kB/s)
Preconfiguring packages ...
dpkg: error processing archive /var/cache/apt/archives/gcc-8-base_8.3.0-6_armhf.deb (--unpack):
 package architecture (armhf) does not match system (arm64)
dpkg: error processing archive /var/cache/apt/archives/libgcc1_1%3a8.3.0-6_armhf.deb (--unpack):
 package architecture (armhf) does not match system (arm64)
dpkg: error processing archive /var/cache/apt/archives/libc6_2.28-10_armhf.deb (--unpack):
 package architecture (armhf) does not match system (arm64)
dpkg: error processing archive /var/cache/apt/archives/libunistring2_0.9.10-1_armhf.deb (--unpack):
 package architecture (armhf) does not match system (arm64)
dpkg: error processing archive /var/cache/apt/archives/libidn2-0_2.0.5-1+deb10u1_armhf.deb (--unpack):
 package architecture (armhf) does not match system (arm64)
Errors were encountered while processing:
 /var/cache/apt/archives/gcc-8-base_8.3.0-6_armhf.deb
 /var/cache/apt/archives/libgcc1_1%3a8.3.0-6_armhf.deb
 /var/cache/apt/archives/libc6_2.28-10_armhf.deb
 /var/cache/apt/archives/libunistring2_0.9.10-1_armhf.deb
 /var/cache/apt/archives/libidn2-0_2.0.5-1+deb10u1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

运行apt policy libc6:arm{hf,64} libgcc1:arm{hf,64}输出:

libc6:armhf:
  Installed: (none)
  Candidate: 2.28-10
  Version table:
     2.28-10 990
        990 http://deb.debian.org/debian buster/main armhf Packages
libc6:
  Installed: 2.28-10
  Candidate: 2.28-10
  Version table:
 *** 2.28-10 990
        990 http://deb.debian.org/debian buster/main arm64 Packages
        100 /var/lib/dpkg/status
libgcc1:armhf:
  Installed: (none)
  Candidate: 1:8.3.0-6
  Version table:
     1:8.3.0-6 990
        990 http://deb.debian.org/debian buster/main armhf Packages
libgcc1:
  Installed: 1:8.3.0-6
  Candidate: 1:8.3.0-6
  Version table:
 *** 1:8.3.0-6 990
        990 http://deb.debian.org/debian buster/main arm64 Packages
        100 /var/lib/dpkg/status

答案1

我遇到了同样的问题(package architecture (armhf) does not match system (arm64)做时有多个apt install libc6:armhf)。对我来说执行dpkg --add-architecture armhf解决了这个问题。

答案2

我在 Ubuntu Mate Desktop 20.04 的 Raspi 版本上遇到了完全相同的问题。我尝试安装 Raspi Ubuntu Server 20.04(无桌面),然后添加armhf架构和:armhf库。然后,我在此服务器安装上安装了 Mate 桌面,并安装了 32 位应用程序(这需要我将自定义 32 位库复制到/usr/lib)并且它起作用了。如果您的应用程序需要 Raspbian 特定的库,我不确定它是否可以做同样的事情,但您可以尝试。

相关内容