2

After trying to do a regular update on Debian Buster, I ended up with the following issue.

The following package was automatically installed and is no longer required:
  libraw16
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
  libraw19
The following packages will be upgraded:
  brave console-setup console-setup-linux e2fslibs glib-networking glib-networking-common glib-networking-services inkscape keyboard-configuration libcom-err2 libcomerr2
  libcupsfilters1 libgegl-0.4-0 libgsl23 libgslcblas0 libllvm6.0 liborcus-0.13-0 libqt5qml5 libqt5quick5 librsvg2-2 librsvg2-common libss2 libwpg-0.3-3 libzmq5 logrotate
  skypeforlinux slack-desktop
27 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/262 MB of archives.
After this operation, 2,084 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Reading changelogs... Done
Preconfiguring packages ...
Setting up e2fsprogs (1.44.4-2) ...
/var/lib/dpkg/info/e2fsprogs.postinst: 8: /var/lib/dpkg/info/e2fsprogs.postinst: update-initramfs: not found
dpkg: error processing package e2fsprogs (--configure):
 installed e2fsprogs package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 e2fsprogs

apt policy returns the following for initramfs-tools

initramfs-tools:
  Installed: 0.132
  Candidate: 0.132
  Version table:
 *** 0.132 990
        990 http://ftp.ro.debian.org/debian buster/main amd64 Packages
        100 /var/lib/dpkg/status
     0.120+deb8u3 500
        500 http://ftp.debian.org/debian jessie/main amd64 Packages

So, as it seems, I do have update-initramfs, but for some reason it won't run. Since I have some jessie backports, the issue may be lying there, but I have no idea what could be the exact problem.

And here is my sources.list

deb http://ftp.ro.debian.org/debian/ buster main non-free contrib
deb-src http://ftp.ro.debian.org/debian/ buster main non-free contrib

deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security buster/updates main contrib non-free

deb http://ftp.ro.debian.org/debian/ buster-updates main contrib non-free
deb-src http://ftp.ro.debian.org/debian/ buster-updates main contrib non-free

1 Answers1

2

The

1 not fully installed or removed.

line in your apt output presumably refers to e2fsprogs, since it doesn’t appear elsewhere (so it has to be pending configuration for its postinst to run). This means that the reason e2fsprogs won’t configure itself is related to some previous apt operation.

To unblock the situation, edit /var/lib/dpkg/info/e2fsprogs.postinst and change the update-initramfs -u line to /usr/sbin/update-initramfs -u, since that’s what’s checked just above. Then run sudo dpkg --configure --pending; if that completes successfully, you should be able to use apt again without error (at least, without errors related to e2fsprogs.

As to the underlying reason, it could be that /usr/sbin is no longer on your root path. If that is the case, I expect other maintainer scripts will fail...

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
  • Thank you, you're a life savior. And you were also right for the sbin not being on the root path for some reason. With that fixed, everything's working now. – El Gato Loco Sep 01 '18 at 14:16
  • Thanks it was two other packages from initramfs family that did this and needed to be chenged in the same way. – user377178 Jul 05 '22 at 08:50