0

Today I finally guessed the mechanism why when I tried to install set of debian packages downloaded with dependencies e.g. apt-get install --download-only --assume-yes libssl-dev even with dpkg status file empty (lots of deb files), still when installing I once (and today again) could not install: apt-get install path/*.deb printed The following additional packages will be installed: libssl1.1:i386. (I've already tried to get help describing the result, but the questions were aimed at as I know understand incorrect cause): How does apt keep track of BUILD (source) dependencies? and https://stackoverflow.com/questions/70491862/how-to-list-download-the-recursive-build-dependencies-of-a-debian-package

My guess was that package libssl1.1 for i386 architecture was installed here (that I checked in status file - it was: Status: install ok installed for both amd64 and i386). So when installing libssl1.1 apt-get tried to upgrade that libssl1.1 for all installed architectures for that package. But when downloading on a system where there are no packages for other architectures except for the one requested on command line apt-get downloads only one architecture.

Is there any option to install packages and dependencies for only one architecture? I do not see how it could break the system if only one architecture gets a change. (alternatively to download dependencies for all available architectures)?

man apt-get:
       --arch-only
           Only process architecture-dependent build-dependencies. Configuration Item:
           APT::Get::Arch-Only.

however:

sudo apt-get install --download-only --assume-yes --arch-only libssl-dev
E: Command line option --arch-only is not understood in combination with the other options

1 Answer 1

1

I do not see how it could break the system if only one architecture gets a change.

Packages installed for multiple architectures are allowed to share files, but those files must be strictly identical. To avoid issues with this requirement, such packages must be kept in sync, so it’s impossible to upgrade a package for only one architecture if it’s installed for multiple architectures.

To avoid installing packages you don’t need from your initial set of downloaded packages, you can be more specific when giving the list of packages to install. For example

apt install path/*_{amd64,all}.deb

will only install packages for amd64 and architecture-independent packages.

To download packages for all enabled architectures, loop over them:

for arch in $(dpkg --print-architecture) $(dpkg --print-foreign-architectures); do
  sudo apt install --download-only --assume-yes libssl-dev:"$arch"
done
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .