I'm using Xubuntu 22.04.1, originally used 20.04 some months ago and then performed a dist-upgrade with no major errors. Yesterday, after updating and upgrading with apt, the following messages show:
Preparing to unpack .../archives/apt_2.4.8_amd64.deb ...
/var/lib/dpkg/tmp.ci/preinst: 4: dpkg-maintscript-helper: not found
dpkg: error processing archive /var/cache/apt/archives/apt_2.4.8_amd64.deb (--unpack):
new apt package pre-installation script subprocess returned error exit status 127
/var/lib/dpkg/tmp.ci/postrm: 14: dpkg-maintscript-helper: not found
dpkg: error while cleaning up:
new apt package post-removal script subprocess returned error exit status 127
Errors were encountered while processing:
/var/cache/apt/archives/apt_2.4.8_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
After sudo apt -f install
and sudo dpkg --force-all -i /var/cache/apt/archives/apt_2.4.8_amd64.deb
the same error shows, even after sudo apt clean
.
Also tried sudo dpkg-reconfigure apt
, but it says:
/usr/sbin/dpkg-reconfigure: apt is broken or not fully installed
I have not found anything related to my problem. Although I could reinstall the OS, I would prefer to know if there's a solution to this