I am running Arch Linux. My locale appears to be incorrectly set, but I don't know how to fix it. When I run locale
, my system outputs the following:
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"
LC_ALL=
The problem with this output is that it reads en-US.UTF-8
with a hyphen instead of en_US.UTF-8
with an underscore. However, my locale.conf reads LANG=en_US.UTF-8
, and running sudo locale-gen
doesn't fix this.
This problem is affecting different applications. For example, when I run rofi -show
, I am faced with the following output:
(process:2360): Rofi-WARNING **: 20:42:40.268: Failed to set locale.
and when I run alacritty
I get a similar error:
xkbcommon: ERROR: couldn't find a Compose file for locale "en-US.UTF-8" (mapped to "en-US.UTF-8")
Error: Failed to spawn command '/usr/bin/zsh': No such file or directory (os error 2)
Sorry if I made any obvious/rookie mistakes, as I'm new to writing questions on Super User. Thank you for taking the time to read this, and any help is greatly appreciated!