You are not logged in.

#1 2020-07-15 05:27:49

Rdbo
Member
Registered: 2020-07-15
Posts: 1

Cannot set LC_* to default locale: No such file or directory

When I run the command "locale", it displays:
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"

I believe this problem might be affecting the encoding of my terminal, as when I run zsh (with OhMyZsh installed), it is unable to display some characters, showing them as .
How would I fix this locale problem? I've already run the following commands:
$ localectl set-locale LANG="en_US.UTF-8"
$ locale-gen LANG="en_US.UTF-8" #Returns: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8). Bad entry 'LANG=en_US.UTF-8 '

EDIT:
Fix (run as root):

echo en_US.UTF-8 UTF-8 > /etc/locale.gen && locale-gen

Turns out my locale.gen had written  only "en_US.UTF-8" and not "en_US.UTF-8 UTF-8" and it wouldn't work because of that

Last edited by Rdbo (2020-07-15 13:18:20)

Offline

#2 2020-07-15 06:16:39

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,538

Re: Cannot set LC_* to default locale: No such file or directory

Did you generate the locale as described here?

Offline

#3 2020-07-15 12:52:24

philo
Member
Registered: 2015-01-26
Posts: 251

Re: Cannot set LC_* to default locale: No such file or directory

Offline

Board footer

Powered by FluxBB