0

I am trying to install new package with apt-get install but I run in thousands dpkg errors.

dpkg: warning: files list file for package 'fonts-tlwg-kinnari' missing; assuming     package has no files currently installed
dpkg: warning: files list file for package 'fonts-smc-raghumalayalamsans' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'sosreport-oem' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libgles2:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'humanity-icon-theme' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libexpat1-dev:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libass9:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-louis' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'pinentry-gnome3' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'apt-config-icons-hidpi' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libpwquality1:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libfaudio0:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libfaudio0:i386' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'oem-somerville-meta' missing; assuming package has no files currently installed

The list goes on for every package I have (I guess). After all the warnings this is logged:

(Reading database ... 49236 files and directories currently installed.)
Preparing to unpack .../0-aptitude-common_0.8.12-1ubuntu4_all.deb ...
Unpacking aptitude-common (0.8.12-1ubuntu4) ...
Selecting previously unselected package libcwidget4:amd64.
Preparing to unpack .../1-libcwidget4_0.5.18-5build1_amd64.deb ...
Unpacking libcwidget4:amd64 (0.5.18-5build1) ...
Selecting previously unselected package libxapian30:amd64.
Preparing to unpack .../2-libxapian30_1.4.14-2_amd64.deb ...
Unpacking libxapian30:amd64 (1.4.14-2) ...
Selecting previously unselected package aptitude.
Preparing to unpack .../3-aptitude_0.8.12-1ubuntu4_amd64.deb ...
Unpacking aptitude (0.8.12-1ubuntu4) ...
Selecting previously unselected package libsub-name-perl.
Preparing to unpack .../4-libsub-name-perl_0.26-1_amd64.deb ...
Unpacking libsub-name-perl (0.26-1) ...
Selecting previously unselected package libclass-accessor-perl.
Preparing to unpack .../5-libclass-accessor-perl_0.51-1_all.deb ...
Unpacking libclass-accessor-perl (0.51-1) ...
Selecting previously unselected package libio-string-perl.
Preparing to unpack .../6-libio-string-perl_1.08-3_all.deb ...
Unpacking libio-string-perl (1.08-3) ...
Selecting previously unselected package libparse-debianchangelog-perl.
Preparing to unpack .../7-libparse-debianchangelog-perl_1.2.0-13_all.deb ...
Unpacking libparse-debianchangelog-perl (1.2.0-13) ...
Setting up libxapian30:amd64 (1.4.14-2) ...
Setting up php8.2-common (8.2.10-1+ubuntu20.04.1+deb.sury.org+2) ...
dpkg: error processing package php8.2-common (--configure):
 installed php8.2-common package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of php8.2-mysql:
 php8.2-mysql depends on php8.2-common (= 8.2.10-1+ubuntu20.04.1+deb.sury.org+2); however:
  Package php8.2-common is not configured yet.

...

here are hundreds of same lines for packages not configured

...

dpkg: error processing package php8.2-mysql (--configure):
 dependency problems - leaving unconfigured
Setting up php7.4-common (1:7.4.33-8+ubuntu20.04.1+deb.sury.org+1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: error processing package php7.4-common (--configure):
 installed php7.4-common package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of php8.2-bz2:
 php8.2-bz2 depends on php8.2-common (= 8.2.10-1+ubuntu20.04.1+deb.sury.org+2); however:
  Package php8.2-common is not configured yet.

dpkg: error processing package postgresql (--configure): dependency problems - leaving unconfigured Processing triggers for man-db (2.9.1-1) ... Processing triggers for libc-bin (2.31-0ubuntu9.9) ... Errors were encountered while processing: php8.2-common php8.2-mysql php7.4-common php8.2-bz2 php7.4-curl php7.4-fpm php7.4-bcmath php8.2-zip php8.2-opcache php8.2-readline php8.2-mbstring php7.4-readline php7.4-mbstring ufw php7.4-bz2 php7.4-cli php8.2-phpdbg php8.2-curl php7.4 php7.4-zip php8.2-xml php8.2 postgresql-common libapache2-mod-php8.2 php7.4-opcache php8.2-gd php8.2-cli postgresql-15 php7.4-gd libapache2-mod-php7.4 php7.4-json postgresql-contrib postgresql E: Sub-process /usr/bin/dpkg returned an error code (1)

If I run just apt-get update, I get this error:

Hit:22 https://storage.googleapis.com/download.dartlang.org/linux/debian stable Release
Fetched 23.1 kB in 4s (6,442 B/s)
Traceback (most recent call last):
  File "/usr/lib/cnf-update-db", line 8, in <module>
    from CommandNotFound.db.creator import DbCreator
  File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 12, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code

I have found some similar problem that were fixed with:

sudo apt install --reinstall python3-apt

or with following commands:

dpkg --configure -a
apt-get -f install
apt-get clean
apt-get autoclean
apt-get autoremove

and tried to reinstall all packages with next commands:

dpkg --get-selections > selections
sudo dpkg --clear-selections
sudo dpkg --set-selections < selections
sudo apt-get --reinstall dselect-upgrade

But everything is just thriving the same error for dpkg packages missing.

apt-get autoclean

  • 1
    Did you uninstall python3 or try to change versions of default python3? That in effect destroys system. Difficult to recovery from and usually best case is new install & restore your data from last good backup. You also have extra repositories, I might comment those out if you attempt to restore system. – oldfred Sep 11 '23 at 14:18

0 Answers0