I am using a Debian testing system as a persistent live system on a USB stick (using live-build
). This means that the kernel etc. cannot be upgraded, since they are on a read only partition.
I've been using this kind of system for about 13 years now and never run into any problems with aptitude
and apt-get
for installing packages. Recently though I built a new system (I do this once every six months or so) and then after that something I was trying to install must have tried to install an upgrade to the kernel. This failed. This interfered with package installation but I managed to work around it.
However, recently I first started getting an error that linux-image-5.18.0-2-rt-amd64
needed to be upgraded but could not be, since the package was not in the repositories. Every install of any package then began failing with Could not generate list of packages to download.
Following advice from some of the answers I found here, I tried aptitude remove linux-image-5.18.0-2-rt-amd64
, since I in any case do not need a real time kernel. I got this error:
Removing linux-image-5.18.0-2-rt-amd64 (5.18.5-1) ...
/etc/kernel/postrm.d/initramfs-tools:
I: update-initramfs is disabled (live system is running on read-only media).
/etc/kernel/postrm.d/z50-raspi-firmware:
raspi-firmware: missing /boot/firmware, did you forget to mount it?
run-parts: /etc/kernel/postrm.d/z50-raspi-firmware exited with return code 1
dpkg: error processing package linux-image-5.18.0-2-rt-amd64 (--remove):
installed linux-image-5.18.0-2-rt-amd64 package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-5.18.0-2-rt-amd64
Processing was halted because there were too many errors.
Now, whatever package I try to install, the same thing happens and the install fails. I have tried apt-get-f install
, but that just tries to repeat the above operation and fails. I have tried with both aptitude
and apt
and both fail.
I know many answers refer to making changes in the `/var/lib/dpkg/info' directory, but I did not find a clear explanation of what those changes actually imply, so I've been kind of scared of making them.
What should I do in this situation?