I was attempting to upgrade my libc6 version in a "not" nice way. It all started with me trying to update my MariaDB from 10.1 to 10.2. I somehow then managed to find out that libc6=1.24 that was installed, was not good enough, and that it required libc6=1.27. I managed to break my installation, when I used
dpkg -i on a downloaded package here: http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/ (specifically libc6_2.27-3ubuntu1_amd64.deb). I allowed it to automatically deconfigure my other packages, and this is when I know I ruined it.
My system is running
root@redfox:~# lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 9.13 (stretch) Release: 9.13 Codename: stretch
Now, whenever i try to use dpkg, or try to run
apt-get upgrade I run in to missing programs and also having missing / broken dependencies. Here is output:
root@redfox:~# sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: cups-core-drivers hplip-data libart-2.0-2 libcupscgi1 libgutenprint2 libsane-hpaio python3-pexpect python3-pil python3-ptyprocess python3-renderpm python3-reportlab python3-reportlab-accel Use 'sudo apt autoremove' to remove them. The following packages will be REMOVED: hplip libgcc1:i386 printer-driver-gutenprint printer-driver-hpcups printer-driver-postscript-hp 0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 4370 kB disk space will be freed. Do you want to continue? [Y/n] n Abort. root@redfox:~# dpkg --configure -a dpkg: warning: 'ldconfig' not found in PATH or not executable dpkg: error: 1 expected program not found in PATH or not executable Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
What have I done to try to fix it?
I have attempted to downgrade to libc6 version 1.24 again, but I am not sure if that worked out too well. I have also tried to clear package cache, autoclean etc, but I am unfortunately quite stuck on where to go next. I have tried to research what I can do, but it is hard to understand as I feel this is a very specific problem to my state, unfortunately.
I have tried to
cp /bin/true /sbin/ldconfig, as I found that
/sbin/ldconfig was missing. However, it seems like the system is even more damaged than first assumed. Here is output when i try to install packages suggested in the answer of Stephen Kitt below:
sudo dpkg -i libc-bin_2.24-11+deb9u4_amd64.deb locales_2.24-11+deb9u4_all.deb Selecting previously unselected package libc-bin. (Reading database ... 202484 files and directories currently installed.) Preparing to unpack libc-bin_2.24-11+deb9u4_amd64.deb ... Unpacking libc-bin (2.24-11+deb9u4) ... Selecting previously unselected package locales. Preparing to unpack locales_2.24-11+deb9u4_all.deb ... Unpacking locales (2.24-11+deb9u4) ... dpkg: dependency problems prevent configuration of libc-bin: libc-bin depends on libc6 (>> 2.24); however: Package libc6:amd64 is not configured yet. libc-bin depends on libc6 (<< 2.25); however: Version of libc6:amd64 on system is 2.27-3ubuntu1. dpkg: error processing package libc-bin (--install): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of locales: locales depends on libc-bin (>> 2.24); however: Package libc-bin is not configured yet. libc6:amd64 (2.27-3ubuntu1) breaks locales (<< 2.27) and is unpacked but not configured. Version of locales to be configured is 2.24-11+deb9u4. dpkg: error processing package locales (--install): dependency problems - leaving unconfigured Errors were encountered while processing: libc-bin locales