Skip to content

Instantly share code, notes, and snippets.

@zoonderkins
Created November 5, 2020 10:29
Show Gist options
  • Save zoonderkins/6ba4675594998728d0c79326c954473c to your computer and use it in GitHub Desktop.
Save zoonderkins/6ba4675594998728d0c79326c954473c to your computer and use it in GitHub Desktop.
Fix: Can’t exec “locale”: No such file or directory at /usr/share/perl5/Debconf/Encoding.pm

Fix: Can’t exec “locale”: No such file or directory at /usr/share/perl5/Debconf/Encoding.pm

Not found

Solution

https://itsfoss.com/fix-exec-locale-file-directory/

In a terminal, use the following commands to download and extract the libc-bin package:

apt-get download libc-bin
dpkg -x libc-bin*.deb unpackdir/

Next you need to copy these files:

sudo cp unpackdir/sbin/ldconfig /sbin/

Now you need to make sure that things are in order. Run these commands to ensure that:

sudo apt-get install --reinstall libc-bin
sudo apt-get install -f

Normally, this should fix the problem of Can’t exec “locale”: No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16. Do let me know in the comment section whether or not this fixes your problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment