I have a qemu-armhf chroot environment on an amd64 machine (it's mainly for compiling Raspberry Pi code). As such it can run both armhf and amd64 binaries but it's faster doing the latter.
There are certain packages (such as make) where I've installed the amd64 version inside the chroot in order to get better speed. That works well up until I need to apt-get some other armhf package and it happens to have make listed as a dependency, whereupon I get this:
The following packages have unmet dependencies: build-essential : Depends: make but it is not going to be installed dpkg-dev : Depends: make but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
If I try the suggested command, then it says it wants to install
make:armhf and uninstall
make:amd64. I don't want it to do that. How do I tell APT that
make:armhf is already installed (because I want it to use
make:amd64 to satisfy dependencies) without actually installing it?
I've tried using
apt-mark manual make but it says that it is not installed.
I know this probably isn't the right way to do it, but I've been looking at the
/var/lib/dpkg/status file to try to work out how it thinks the package definitions work and to try to trick it into agreeing that make:amd64 satisfies make:armhf as well.
In particular I noticed that "libbz2-1.0" is a package that's listed as installed twice; once as:
Architecture: armhf Multi-Arch: same Pre-Depends: multiarch-support
and once as:
Architecture: amd64 Multi-Arch: foreign Pre-Depends: multiarch-support
So I tried duplicating the entries for "make" similarly, setting all of those values above. But now APT's just saying that "make" and "make:amd64" are conflicted. Why is it a conflict when make does it but not when libbz2-1.0 does it? (I hope it's not special-casing libraries; that seems like it should be a bug.)
Per this answer, I tried building a dummy package with
equivs and installing that (after removing my manual fiddling above), but installing it produces these errors:
# dpkg -i /var/cache/apt/archives/make_3.81-8.2_amd64.deb (real amd64 make) # dpkg -i make_3.81-8.2_armhf.deb (fake armhf depends on the above) Preparing to replace make 3.81-8.2 (using make_3.81-8.2_armhf.deb) ... Unpacking replacement make ... dpkg: dependency problems prevent configuration of make: make depends on make:amd64 (= 3.81-8.2).
So again the problem looks like it thinks make:armhf is a replacement for make:amd64, and I don't know how to tell it that I want these two packages to coexist. (It doesn't seem to have a problem with the idea of two libbz2 packages coexisting, for example.)