A frustrating problem occurred when I sudo apt-get update --> then: sudo apt-get upgrade on UBUNTU 20.04.
I had recently gone through a successful upgrade of PYTHON3.8 to PYTHON3.10 - BUT I do not know if this was responsible for missing ldconfig files and a missing sbin library in usr/locale/.
I checked the 3 root sbin locations: /sbin, usr/locale/sbin, and usr/sbin. /sbin and usr/sbin had the c program utilities in them - but was missing 'ldconfig' utility. AND usr/locale/sbin directory was completely missing.
Here is the messages Linux gives me when I tried to fix broken links:
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libc-bin
The following NEW packages will be installed:
libc-bin
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/633 kB of archives.
After this operation, 3802 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.
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
E: Sub-process /usr/bin/dpkg returned an error code (2)
I had previously downloaded - but did not install - libc-bin - which was a .deb archive called libc-bin_2.31-0ubuntu9.9_amd64.deb
- and had successfully cp'd it over to usr/locale/sbin. When I tried to install and checked - the archive name had changed to 'sbin' in usr/locale/ but had not extracted.
Has anyone run into this issue and been able to navigate to a solution that does not require scrapping the UBUNTU and doing a complete reinstall?
One final note: I am running UBUNTU in a Microsoft Windows 10 machine under WSL. I am only using the command line to configure UBUNTU 20.04 LTS.
ALSO --
The error msgs also mention a missing PERL5 script -- Encoding.pm - but I have not looked into it.
Thank you for your genius in helping me get out of this swamp of problems.