[Pkg-clamav-devel] Bug#1060889: clamav cannot be cross-arch installed?

Trent W. Buck trentbuck at gmail.com
Tue Jan 16 06:59:21 GMT 2024


Package: clamav-base
Version: 1.0.3+dfsg-1~deb12u1
Severity: minor

When trying to install clamav for non-default architecture,
I get this error from apt:

    The following packages have unmet dependencies:
     clamav-daemon:i386 : Depends: clamav-base:i386 (= 1.0.3+dfsg-1~deb12u1) but it is not installable
     clamav-freshclam:i386 : Depends: clamav-base:i386 (>= 1.0.3+dfsg-1~deb12u1) but it is not installable

This is really weird and confusing, because clamav-base is
an Architecture: all package, not
an Architecture: any package.

I speculate that either:

1. apt has a bug that clamav happens to trigger; or
2. clamav's Depends/Conflicts/Replaces are subtly bugged, and should be "fixed"; or
3. I've misunderstood something fundamental about how to use multiple architectures in apt.

Here are the full commands I ran.


These all complete without error:

    bash5$ mmdebstrap bookworm /dev/null --quiet --architecture=amd64 --include=clamav,clamav-daemon

    bash5$ mmdebstrap bookworm /dev/null --quiet --architecture=i386 --include=clamav:i386,clamav-daemon:i386

    bash5$ mmdebstrap bookworm /dev/null --quiet --architecture=i386,amd64 --include=clamav:i386,clamav-daemon:i386

    bash5$ mmdebstrap bookworm /dev/null --quiet --architecture=amd64,i386 --include=curl:i386   # some non-clamav cross-arch install


These fail with the weird bug:

    bash5$ mmdebstrap bookworm /dev/null --architecture=amd64,i386 --include=clamav:i386,clamav-daemon:i386
    I: automatically chosen mode: unshare
    I: chroot architecture amd64 is equal to the host's architecture
    I: finding correct signed-by value...
    done
    I: automatically chosen format: null
    I: using /tmp/mmdebstrap.W2DIp_TEfi as tempdir
    I: running apt-get update...
    done
    I: downloading packages with apt...
    done
    I: extracting archives...
    done
    I: installing essential packages...
    done
    I: installing remaining packages inside the chroot...
    done
    Reading package lists...
    Building dependency tree...
    debconf is already the newest version (1.5.82).
    libpam-runtime is already the newest version (1.5.2-6+deb12u1).
    mawk is already the newest version (1.3.4.20200120-3.1).
    libpam-modules is already the newest version (1.5.2-6+deb12u1).
    libpam-modules-bin is already the newest version (1.5.2-6+deb12u1).
    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:
     clamav-daemon:i386 : Depends: clamav-base:i386 (= 1.0.3+dfsg-1~deb12u1) but it is not installable
     clamav-freshclam:i386 : Depends: clamav-base:i386 (>= 1.0.3+dfsg-1~deb12u1) but it is not installable
    E: Unable to correct problems, you have held broken packages.
    E: setup failed: E: apt-get -o Dir::Bin::dpkg=env -o DPkg::Options::=--unset=TMPDIR -o DPkg::Options::=dpkg -o DPkg::Chroot-Directory=/tmp/mmdebstrap.W2DIp_TEfi --yes install -oAPT::Status-Fd=<$fd> -oDpkg::Use-Pty=false clamav:i386 clamav-daemon:i386 ?narrow(?or(?archive(^bookworm$),?codename(^bookworm$)),?architecture(amd64),?and(?or(?priority(required),?priority(important)),?not(?essential))) failed
    I: main() received signal PIPE: waiting for setup...
    I: removing tempdir /tmp/mmdebstrap.W2DIp_TEfi...
    E: mmdebstrap failed to run

    bash5$ mmdebstrap bookworm /dev/null --architecture=i386,amd64 --include=clamav:amd64,clamav-daemon:amd64
    I: automatically chosen mode: unshare
    I: i386 is different from amd64 but can be executed natively
    I: finding correct signed-by value...
    done
    I: automatically chosen format: null
    I: using /tmp/mmdebstrap.oM_yCF_dpY as tempdir
    I: running apt-get update...
    done
    I: downloading packages with apt...
    done
    I: extracting archives...
    done
    I: installing essential packages...
    done
    I: installing remaining packages inside the chroot...
    done
    Reading package lists...
    Building dependency tree...
    debconf is already the newest version (1.5.82).
    libpam-runtime is already the newest version (1.5.2-6+deb12u1).
    mawk is already the newest version (1.3.4.20200120-3.1).
    libpam-modules is already the newest version (1.5.2-6+deb12u1).
    libpam-modules-bin is already the newest version (1.5.2-6+deb12u1).
    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:
     clamav-daemon:amd64 : Depends: clamav-base:amd64 (= 1.0.3+dfsg-1~deb12u1) but it is not installable
     clamav-freshclam:amd64 : Depends: clamav-base:amd64 (>= 1.0.3+dfsg-1~deb12u1) but it is not installable
    E: Unable to correct problems, you have held broken packages.
    E: setup failed: E: apt-get -o Dir::Bin::dpkg=env -o DPkg::Options::=--unset=TMPDIR -o DPkg::Options::=dpkg -o DPkg::Chroot-Directory=/tmp/mmdebstrap.oM_yCF_dpY --yes install -oAPT::Status-Fd=<$fd> -oDpkg::Use-Pty=false clamav:amd64 clamav-daemon:amd64 ?narrow(?or(?archive(^bookworm$),?codename(^bookworm$)),?architecture(i386),?and(?or(?priority(required),?priority(important)),?not(?essential))) failed
    I: main() received signal PIPE: waiting for setup...
    I: removing tempdir /tmp/mmdebstrap.oM_yCF_dpY...
    E: mmdebstrap failed to run


PS: while not really relevant to this bug report,
    the original context was:

     <twb> grr, clamd keeps getting OOM-killed because
           it loads all definitions into RAM (not mmaped or anything) which
           is 1300MB on this 4000MB system.

     <twb> /var/lib/clamav/ is only 223M, not 1300MB!

     <twb> I wonder if clamav:i386 halves the RAM usage?

     <twb> dpkg --add-architecture=i386;
           apt update;
           apt install clamav:i386 clamav-daemon:i386
           [doesn't work, start investigating]


-- System Information:
Debian Release: 12.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'proposed-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.5.0-0.deb12.4-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled



More information about the Pkg-clamav-devel mailing list