#1032618 crossgrader: First stage error: The cache has no package named 'multiarch-support:amd64'

#1032618#5
Date:
2023-03-10 08:44:27 UTC
From:
To:
I tried to crossgrade an LXC container running Debian 11
from i386 to amd64, and I got this error:


  $ crossgrader amd64

  Installing initramfs binary architecture check hook...
  arch check hook already installed.
  Hook installation failed.
  Hit http://security.debian.org bullseye-security InRelease
  Hit http://deb.debian.org/debian bullseye InRelease
  Hit http://deb.debian.org/debian bullseye-updates InRelease
  Hit http://deb.debian.org/debian bullseye-backports InRelease
  Hit http://deb.debian.org/debian unstable InRelease
  Fetched 0 B in 0s (0 B/s)
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/apt/cache.py", line 281, in __getitem__
      rawpkg = self._cache[key]
  KeyError: 'multiarch-support:amd64'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/debian_crossgrader/utils/apt.py", line 87, in find_package_objs
      package = apt_cache[target_name]
    File "/usr/lib/python3/dist-packages/apt/cache.py", line 283, in __getitem__
      raise KeyError('The cache has no package named %r' % key)
  KeyError: "The cache has no package named 'multiarch-support:amd64'"

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/usr/bin/crossgrader", line 33, in <module>
      sys.exit(load_entry_point('debian-crossgrader==0.0.3', 'console_scripts', 'crossgrader')())
    File "/usr/lib/python3/dist-packages/debian_crossgrader/__main__.py", line 262, in main
      first_stage(args)
    File "/usr/lib/python3/dist-packages/debian_crossgrader/__main__.py", line 21, in first_stage
      targets = crossgrader.list_first_stage_targets(
    File "/usr/lib/python3/dist-packages/debian_crossgrader/crossgrader.py", line 735, in list_first_stage_targets
      return self.find_package_objs(targets, default_arch=self.target_arch,
    File "/usr/lib/python3/dist-packages/debian_crossgrader/crossgrader.py", line 613, in find_package_objs
      return apt_utils.find_package_objs(names, self._apt_cache, **kwargs)
    File "/usr/lib/python3/dist-packages/debian_crossgrader/utils/apt.py", line 92, in find_package_objs
      raise PackageNotFoundError(target_name)
  debian_crossgrader.utils.apt.PackageNotFoundError: multiarch-support:amd64 could not be found in APT's cache

#1032618#10
Date:
2023-05-21 14:52:26 UTC
From:
To:
Hi,

this error is relatively harmless, see the workaround in the
crossgrader instructions

https://salsa.debian.org/crossgrading-team/debian-crossgrading/-/blob/master/INSTRUCTIONS.md#second-stage-the-rest-of-the-owl

I just cross-graded my NAS this way from i386 to amd64 without a glitch
(using --force-unavailable in the second stage after similar errors for
linux-image-6.1.0-9-686:amd64 and linux-image-686:amd64).

But the above file should be added to the package's docs and a hint to
the file should be
displayed when the program starts. Apparently README.md and INSTRUCTIONS.md
were added in 0.0.4, but it was never uploaded.

Cheers, Roderich

#1032618#15
Date:
2025-07-21 15:45:10 UTC
From:
To:
Maybe the error is "harmless" but it would be much better to output
a list of packages that can't be crossgraded and ask whether to remove them.
[ And beware, it may also include packages that *can/should* be
  crossgraded, but which weren't found because of a faulty
  `sources.list`.  ]


        Stefan