DEV Community

Brisbane Web Developer
Brisbane Web Developer

Posted on

1

Avoid error with "locale-check" on Debian 20.04

Summary

  • Noticed I get the error -bash: /usr/bin/locale-check: No such file or directory every time I become root via sudo su - ay my Debian 20.04 Server.

The Amendment

  • The error seems to be from the file /etc/profile.d/01-locale-fix.sh and there is no package having the file for Debian 20.04 (Ubuntu does).

  • So regardless the file is going to be added to the package base-files or I need to install another package, I decided to avoid the error in the way it starts working whenever the file is added to the server.

/etc/profile.d/01-locale-fix.sh
==========
# Make sure the locale variables are set to valid values.
# Hack: Added "if" statement because Debian 20.04 does not seem
# to have the file "/usr/bin/locale-check"
if [ -f "/usr/bin/locale-check" ];
then
    eval $(/usr/bin/locale-check C.UTF-8)
fi
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Retry later