I have a system that is due to be upgraded but I'm having conflicts with apt-get -f install
:
apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
login sysvinit-utils util-linux
Suggested packages:
kbd util-linux-locales
The following packages will be upgraded:
login sysvinit-utils util-linux
3 upgraded, 0 newly installed, 0 to remove and 106 not upgraded.
13 not fully installed or removed.
Need to get 0 B/1775 kB of archives.
After this operation, 1886 kB of additional disk space will be used.
Do you want to continue? [Y/n]
E: Sub-process false returned an error code (1)
E: Prior errors apply to /var/cache/apt/archives/sysvinit-utils_2.96-7_arm64.deb
E: Prior errors apply to /var/cache/apt/archives/util-linux_2.36.1-8_arm64.deb
E: Prior errors apply to /var/cache/apt/archives/login_1%3a4.8.1-1_arm64.deb
debconf: apt-extracttemplates failed: No such file or directory
(Reading database ... 9765 files and directories currently installed.)
Preparing to unpack .../sysvinit-utils_2.96-7_arm64.deb ...
Unpacking sysvinit-utils (2.96-7) over (2.88dsf-59) ...
dpkg: error processing archive /var/cache/apt/archives/sysvinit-utils_2.96-7_arm64.deb (--unpack):
trying to overwrite '/lib/init/vars.sh', which is also in package initscripts 2.88dsf-59
Errors were encountered while processing:
/var/cache/apt/archives/sysvinit-utils_2.96-7_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I don't understand why it says E: Sub-process false returned an error code (1)
after I confirm installation of the packages. Can anyone help me with this?
initscripts is a purely virtual package, so it is safe to give dpkg permission to overwrite it. Open the terminal and type:
sudo dpkg -i --force-overwrite /var/cache/apt/archives/sysvinit-utils_2.96-7_arm64.deb
If you're not using dpkg directly and using an apt front-end like apt or apt-get, the following command defines the same custom dpkg option to use as the previous command.
sudo apt-get -o Dpkg::Options::="--force-overwrite" install sysvinit-utils
How do I figure out which packages are "virtual" and can easily be overwritten, I've got a similar issue now with
init-system-helpers_1.60_all.deb
but don't know if it's safe to apply the same method as aboveI ran the following command to show information about the initscripts package:
apt show sysvinit-utils
I did this but it doesn't say anything about it being virtual nor does it show that it would contain multiple packaes like
sysvinit-utils
does. So I think I'll have to look at an alternative method to resolve this conflict, any suggestions?@stdcerr I checked in Debian Package Search for sysv-rc 2.88dsf-59 which is a package for Debian 8 (jerssie) and it seems to be not a purely virtual package. Because it's a real package the terminal is warning you that installing init-system-helpers_1.60_all.deb broke the package management in your Debian 8.0. init-system-helpers_1.60_all.deb is only compatible with Debian 11 (bullseye), so you must uninstall this package and install init-system-helpers_1.22_all.deb instead (that's the one for jessie) from http://ftp.debian.org/.
I also recommend that you confirm this yourself by running
rmadison -u debian init-system-helpers
to find the package version of init-system-helpers in jessie which is version 1.22. jessie is currently referred to by Debian as oldoldoldstable. jessie is currently unofficial commercial extended LTS supported and ELTS support for jessie will end on 2022-06-30. ELTS is not a Debian project.