Why does the error "bash warning setlocale LC_CTYPE cannot change locale (en_US.UTF-8) No such file or directory" error occurs while switching to root?
Issue
- Unable to login in system or switch to
root
user. Below error message occurs:
[test@localhost]$ su -
-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
Environment
- Red Hat Enterprise Linux 9
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.